cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rbalza
Helper III
Helper III

Need help - IF condition - dax measure

Hi PBI friends,

 

I have a table with two columns named Table[Current Asset] and Table[Current Liabilities] and I wanted to make a dax measure where:

 

1.) if there were negative values inputted on the table[current asset], it will be then transferred to table[current liabilities], else it will stay at table[current asset]

 

2.) if there were negative values inputted on the table[current liabilities], it will be then transferred to table[current asset], else it will stay at table[current liabilities].

 

See below-desired output:

rbalza_0-1623630350937.png

 

5 REPLIES 5
TarunSharma
Responsive Resident
Responsive Resident

Hello @rbalza 
In this case, the calculated column will be the better option.
Please check the link.

TarunSharma
Responsive Resident
Responsive Resident

Hello @rbalza 
You can create a calculated column and use in your visual.
Conditioning =
IF (
table[current asset] < 0,
table[current liabilities],
IF ( table[current liabilities] < 0, table[current asset] )
)

Hi @TarunSharma , thanks for taking the time on this. Was it the same measure if I use it on DAX? Thanks a lot!

 

TarunSharma
Responsive Resident
Responsive Resident

Hello @rbalza 
Nope. You have to use VALUES to store the field values. If you need further help please share your data in a table format with the expected output after removing the sensitive information.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.