Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

IF condition but need to show total

Hello Everyone,
 
I have this condition that only if the result is negative then it would show else it would show blank. Problem is, it would no longer show the total. Would you know the reason why and do you have another way of writing this DAX to show the total?
 
Saving (USD) = IF(([Variance] * CALCULATE(SUM(Salary[Salary in USD]),TREATAS(DISTINCT(Table1[Delivery Country]),Salary[Country]))) >0,"",([Variance] * CALCULATE(SUM(Salary[Salary in USD]),TREATAS(DISTINCT(Table1[Delivery Country]),Salary[Country]))))
 
Thank you!
Here's a screenshot of the table
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Based on the group by in yourr visual, you need to create a measure

 

sumx(Values(Table1[Delivery Country]),[Saving (USD)])

 

and use that.

 

Also, check

https://www.youtube.com/watch?v=ufHOOLdi_jk

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Based on the group by in yourr visual, you need to create a measure

 

sumx(Values(Table1[Delivery Country]),[Saving (USD)])

 

and use that.

 

Also, check

https://www.youtube.com/watch?v=ufHOOLdi_jk

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.