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.
hi,
i am new to dax, in data i have values from 1 to 4753 and i want to categorize data into intervals of 1-7,8-15,16-30,31-60,61-90,90-180,>180. how should i do it? please help me
Solved! Go to Solution.
Hi @Vinay06 ,
You can do this in Power Query using Conditional Columns
http://www.plumblineconsulting.com/power-bi-create-buckets-for-continuous-values/
else in DAX use this code:
Group Name =
SWITCH (
TRUE (),
Table1[column X] >= 180, ">180",
Table1[column X] < 180
&& Table1[column X] >= 90, "90-180",
Table1[column X] < 90
&& Table1[column X] >= 61, "61-90",
Table1[column X] < 60
&& Table1[column X] >= 31, "31-60",
Table1[column X] < 30
&& Table1[column X] >= 16, "16-30",
Table1[column X] < 15
&& Table1[column X] >= 8, "8-15",
"1-7"
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @Vinay06 ,
You can do this in Power Query using Conditional Columns
http://www.plumblineconsulting.com/power-bi-create-buckets-for-continuous-values/
else in DAX use this code:
Group Name =
SWITCH (
TRUE (),
Table1[column X] >= 180, ">180",
Table1[column X] < 180
&& Table1[column X] >= 90, "90-180",
Table1[column X] < 90
&& Table1[column X] >= 61, "61-90",
Table1[column X] < 60
&& Table1[column X] >= 31, "31-60",
Table1[column X] < 30
&& Table1[column X] >= 16, "16-30",
Table1[column X] < 15
&& Table1[column X] >= 8, "8-15",
"1-7"
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
its working,thank you.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |