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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Variance % shows 100% instead of zero%

Here is my variance formula: 

Variance = Calculate (Sum('Budget'[Approved Budget])-Calculate ('Measures (2)'[TotalAnc+Commit]))
 It works like I want it to, with the exception of returning 100% instead of 0% when the numbers are the same (the stoplight is correct with yellow=100%).  Is it possible to get both the zero percent AND still get the stoplight to work as I need?
DeeMeza_0-1634571969797.png

 

DeeMeza_1-1634572014023.png

 

Any help would be appreciated!

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Is it a matrix? You could use ISINSCOPE()  ,such as:

what% =
VAR _per =
    DIVIDE ( [EAC1], SUM ( [Approved Budget] ) )
RETURN
    IF ( ISINSCOPE ( 'Table'[Index] ), _per, IF ( _per = 1, 0, _per ) )

The final output is shown below:

vyalanwumsft_1-1634790054873.png

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Is it a matrix? You could use ISINSCOPE()  ,such as:

what% =
VAR _per =
    DIVIDE ( [EAC1], SUM ( [Approved Budget] ) )
RETURN
    IF ( ISINSCOPE ( 'Table'[Index] ), _per, IF ( _per = 1, 0, _per ) )

The final output is shown below:

vyalanwumsft_1-1634790054873.png

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VahidDM
Super User
Super User

Hi @Anonymous 

 

Can you share the codes you used for WHAT% measure?

 

You can use variable and IF statment to change 0 to 100%.

 

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

Appreciate your Kudos!!

Anonymous
Not applicable

What% = DIVIDE(
What%= Divide (('Measures (2)'[EAC]),
Sum(Budget[Approved Budget]))
 
I have no idea how to do a variable and IF statement.  I'm not very good with DAX.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors