Swapnil
Swapnil

Reputation: 15

How to Assign Value

I have 2 Columns based on the same table. Please refer to the below Screenshot.

enter image description here

I want to be assigned ReferenceNO to null values are present in ApplicationNo Column. There is any way to assign values? Your assistance will help me to sort out this issue.

Thanks in advance.

Upvotes: 0

Views: 195

Answers (2)

Rostam Bamasi
Rostam Bamasi

Reputation: 274

You can use the code below in SQL before sending data to PowerBi :

 Isnull(ApplicationNo,ReferenceNo) as ApplicationNo

or in Power Bi add a custom column and code like below; Help link : Custom Column :

= if [ApplicationNo] = null then [ReferenceNo] else [ApplicationNo] 

or add a conditional column in power bi. Help link : Conditional Column.

Upvotes: 1

Gangula
Gangula

Reputation: 7294

@Rostam's answer replaces null in ApplicationNo with ReferenceNo using DAX or SQL.

But based on what I understand, I think what you're looking for is a feature called "Fill Down" in PowerBI. Check out this video for an example.

  • What this doesn't is basically copies the data from the last found non-empty cell to current cell.
  • You can also do the opposite using "Fill Up"

Note: I recommend doing this because this maintains data consistency.

Upvotes: 0

Related Questions