cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## Difference of Measure - Alternate Solution

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

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.

Thanks!

1 ACCEPTED SOLUTION
Community Support

>>But since I am using if condition already in B to replace blabk() with 0, I am not sure hoe to get 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.

2 REPLIES 2
Community Support

>>But since I am using if condition already in B to replace blabk() with 0, I am not sure hoe to get 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.

Super User

@jayasurya_prud , Not very clear

but you need like

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

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors