Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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]
)
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |