cancel
Showing results for
Did you mean:

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

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

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
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]).

Proud to be a Super User!

New Member

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.

Super User
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.

Proud to be a Super User!

Announcements

#### New forum boards available in Real-Time Intelligence.

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

#### Power BI Monthly Update - May 2024

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

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors