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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AlexEncuble
New Member

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.