Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all!
I have a column that contains a number. This number represents the number of days:
| Days |
| 1 |
| 12 |
| 5 |
| 25 |
Now I would like to place next to this column a calculated column that translates this numbers into this groups:
For this I would take a long IF Statement. Is there any alternative?
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I think one of ways to solve it is, and I suggest, having a Grouping Table like below.
I tried to create a sample pbix file like below, and please check the below picture and the attached pbix file.
It is for creating a calculated column.
Group CC =
SUMMARIZE (
FILTER (
'Grouping',
'Grouping'[Min] <= Data[Days]
&& OR ( 'Grouping'[Max] >= Data[Days], 'Grouping'[Max] = BLANK () )
),
'Grouping'[Group]
)
Hi,
I am not sure if I understood your question correctly, but I think one of ways to solve it is, and I suggest, having a Grouping Table like below.
I tried to create a sample pbix file like below, and please check the below picture and the attached pbix file.
It is for creating a calculated column.
Group CC =
SUMMARIZE (
FILTER (
'Grouping',
'Grouping'[Min] <= Data[Days]
&& OR ( 'Grouping'[Max] >= Data[Days], 'Grouping'[Max] = BLANK () )
),
'Grouping'[Group]
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 30 | |
| 19 | |
| 12 | |
| 11 |