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
DoubleElle_2
Frequent Visitor

Create categories based on a measure

Hello,

 

I'm pretty new to Power BI so forgive me if my question is obvious for you all. 

 

I have a table called CALLS and I'd like to create two categories based on measure values. 

 

My measure is the one below:

 

call_numbers = CALCULATE(DISTINCTCOUNT(CALLS[call_ID]), FILTER(CALLS, CALLS[sms] = "1"))
 
I'm trying with something like this but it doesn't work as it should:
 
Categories=
SWITCH(
    TRUE(),
    call_numbers > 1 && call_numbers <= 3, "1-3",
    call_numbers > 3 && call_numbers <= 4, "4",
    BLANK()
)
 
Format:
CALLS[call_ID] = text 
CALLS[sms] = text 

call_numbers = int number 

 

I'm afraid that the problem could be related to the filter. 

Is there someone who can help me? 

 

Thanks in advance 

 

1 REPLY 1
johnt75
Super User
Super User

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.