Forum Discussion
AmalrajRRD1
8 years agoHelper II
Grouping values
Hi all, I have sales data upto one laks, I want to group the data like "<1000, 1000-5000", "5000-7000" and <7000. How to do it in dax function? somebody help me on this ? thanks
- 8 years ago
Hi AmalrajRRD1,
Add calculated column with below DAX formual.
Group = IF ( Table1[Sales] < 1000, "<=1000", IF ( Table1[Sales] > 1000 && Table1[Sales] <= 5000, "1000-5000", IF ( Table1[Sales] > 5000 && Table1[Sales] <= 7000, "5000-7000", ">7000" ) ) )Alternatively, you can right click the [sales] field and choose "new group".
Result.
Best regards,
Yuliana Gu
v-yulgu-msft
8 years agoMicrosoft Employee
Hi AmalrajRRD1,
Add calculated column with below DAX formual.
Group =
IF (
Table1[Sales] < 1000,
"<=1000",
IF (
Table1[Sales] > 1000
&& Table1[Sales] <= 5000,
"1000-5000",
IF ( Table1[Sales] > 5000 && Table1[Sales] <= 7000, "5000-7000", ">7000" )
)
)
Alternatively, you can right click the [sales] field and choose "new group".
Result.
Best regards,
Yuliana Gu
- AmalrajRRD18 years agoHelper II
Thanks for your Reply.