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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply

Difference of Measure - Alternate Solution

Hi, I am working on a dashboard, where I am using cards visuals. Like below

 

jayasurya_prud_1-1669617417947.png

 

 

In the card, C = A-B. 

Now, I am facing the scenerio in which based on the filters, sometimes the value of B will blank() which I will be replacing by 0. 

 

In that case of B comes as Blank() (replaced by 0), the C should not come as C = A -B. Like A = 10, B = Blank()/0, C = 10. 

 

In those cas, the C should indicate NA. 

 

I know that I can use if condition. But since I am using if condition already in B to replace blabk() with 0, I am not sure hoe to get this. 

 

Please help.

 

Thanks!

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @jayasurya_prud 

>>But since I am using if condition already in B to replace blabk() with 0, I am not sure hoe to get this. 

please try this, 

measure1= if(isblank([measure in card B]),0,[measure in card B])

and put measure1 into Card B

measure2= if(isblank([measure in card B]), "NA", [measure in card B])

and put measure2 into Card C

 

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @jayasurya_prud 

>>But since I am using if condition already in B to replace blabk() with 0, I am not sure hoe to get this. 

please try this, 

measure1= if(isblank([measure in card B]),0,[measure in card B])

and put measure1 into Card B

measure2= if(isblank([measure in card B]), "NA", [measure in card B])

and put measure2 into Card C

 

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@jayasurya_prud , Not very clear

 

but you need like

 

c = if([b]=0 || isblank([b]) , blank(), [A] -[b])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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