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
doubles
Helper I
Helper I

Percent Change calculation = to 0 being treated as blank

I am having an issue ranking a percent change calculation becasue when I have a percent change of 0, it is being treated as blank.  In the screen shot, you can see there are 2 categories where my prevyear and curryear counts are the same and therefore the % change is 0. My RankX formula is below -- it does what I want, except its treating the 0% changes as blanks. I created 2 simple measures Test0 and TestBlank  -- IF([PercentChange] = blank(),1,0) -- IF([PercentChange] = 0,1,0) and you can see 0s and blanks are returning 1s. Any insight would be appreciated. ThanksBlank0.PNG


Rank=
IF (
[PercentChange] = BLANK (),
BLANK (),
RANKX (
FILTER (
ALL ( Category[Value] ),
[PercentChange] <> BLANK ()
),
[PercentChange]
)
)

 

1 ACCEPTED SOLUTION
doubles
Helper I
Helper I

1 REPLY 1
doubles
Helper I
Helper I

Looks like using ISBLANK, rather than = blank() solves the issue.

 

https://stackoverflow.com/questions/51756571/powerbi-differentiate-blank-value-and-0-value

 

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.