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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AlexEncuble
Regular Visitor

I want to create a measure to show if another meaasure has the value of 5 or more

Hi,

 

I want to create a measure to show if the measure #Picks has a value of 5 or more. 

#Picks = distinctcountnoblank(PickPerformance[pick_id]). 

I have tried three ways to do it
First I tried to just use a measure wit "IF" 
MoreThan5Picks = IF([#Picks]>=5,1,0)
 The measure always said 0

AlexEncuble_0-1699954700325.png

Next I tried the same, but I implemented the formula of the #Picks measure into the MoreThan5Picks Measure:

MoreThan5Picks = IF(distinctcountnoblank(PickPerformance[pick_id])>=5,1,0)
Now it always had the value one. 
I also tried it with Switch: 
MoreThan5Picks = SWITCH(TRUE(),[#Picks]>5,1,[#Picks]=5,1,[#Picks]<5,0)  
 And 
MoreThan5Picks = SWITCH(TRUE(),distinctcountnoblank(PickPerformance[pick_id])>5,1,distinctcountnoblank(PickPerformance[pick_id])=5,1,distinctcountnoblank(PickPerformance[pick_id])<5,0)  

But the result was the same. Now I just don't know why it does not work.

 

Any ideas? 

3 REPLIES 3
some_bih
Super User
Super User

Hi @AlexEncuble think about granularity in your picture: you are showing the lowest level of data with measure definition below? If yes, as your measure return distinctcount per lowest level of data, then it is ok to receive only 1 or in your case with if >5 only 0.

Maybe you wanted measure to apply on higher level of data...

#Picks = distinctcountnoblank(PickPerformance[pick_id]).





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






I don't know what you mean, if the Measure #Picks has more than 5 entries in this visual the measure MoreThan5Picks should have the value 1, else it should have the value 0. 

Spoiler
Hi @AlexEncuble in your visual, you shown all the details?
Definition for your measure is fine, but how you "apply" on visual could create false wrong result, if your visual is at same level of detail as measure. Create some aggrefated view with your measure and check results.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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