Forum Discussion
Dk_bbr
2 years agoRegular Visitor
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?
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")pls see the attachment belowbut 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 a 100 b 110 c 120
you can filter the data that you want
4 Replies
- ryan_mayuSuper User
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")pls see the attachment below