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
Dk_bbr
New Member

Bracket or group

My english too bad hope can understand this.

I want my customers grouping by their sales. like this group is over 100M and this one is over 50M. like premium, gold, silver 

how did you do that writing DAX or?

3 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@Dk_bbr 

you can use SWITCH

 

https://learn.microsoft.com/en-us/dax/switch-function-dax?wt.mc_id=DP-MVP-5004616

 

Measure =
VAR _sales=sum('Table'[sales])
return SWITCH(TRUE(),_sales>300,"premium",_sales>100,"gold","silver")
 
11.PNG
 
pls see the attachment below




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

Proud to be a Super User!




View solution in original post

but like it's all of them comes together , i want to see them separated.  likw this table only showes gold members. How can i calculate this?

gold members sales
a100
b110
c

120

View solution in original post

you can filter the data that you want

11.PNG





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Uzi2019
Super User
Super User

Hi @Dk_bbr 
You can try with calculated column
Group =SWITCH(TRUE(),Sales>10000000,"Premium",Sales>5000000,"Gold","Silver")

 

I hope this is what you are lookin!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
ryan_mayu
Super User
Super User

@Dk_bbr 

you can use SWITCH

 

https://learn.microsoft.com/en-us/dax/switch-function-dax?wt.mc_id=DP-MVP-5004616

 

Measure =
VAR _sales=sum('Table'[sales])
return SWITCH(TRUE(),_sales>300,"premium",_sales>100,"gold","silver")
 
11.PNG
 
pls see the attachment below




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

Proud to be a Super User!




but like it's all of them comes together , i want to see them separated.  likw this table only showes gold members. How can i calculate this?

gold members sales
a100
b110
c

120

you can filter the data that you want

11.PNG





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

Proud to be a Super User!




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.