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.
I have a simple inquiry, want to add new column or measure index based on the column "Days in Query".
If DaysinQuery is >5 then index = 3, 6-10 then index = 2 and >10 then index =1. Thank you all.
Example:
Acct | DaysinQuery |
1 | >5 |
2 | 6-10 |
3 | >10 |
4 | >10 |
5 | 6-10 |
6 | 6-10 |
7 | >5 |
8 | 6-10 |
9 | >5 |
10 | >10 |
Desire result:
Acct | DaysinQuery | OrderingIndex |
1 | >5 | 3 |
2 | 6-10 | 2 |
3 | >10 | 1 |
4 | >10 | 1 |
5 | 6-10 | 2 |
6 | 6-10 | 2 |
7 | >5 | 3 |
8 | 6-10 | 2 |
9 | >5 | 3 |
10 | >10 | 1 |
Solved! Go to Solution.
First of all i think you want days =<5 but if thats the text then it is so. Just doesnt make sense,
Create a new column:
OrderingIndex = IF('TableName'[DaysInQuery] = ">5",3,
IF('TableName'[DaysInQuery] = ">10",1,2))
First of all i think you want days =<5 but if thats the text then it is so. Just doesnt make sense,
Create a new column:
OrderingIndex = IF('TableName'[DaysInQuery] = ">5",3,
IF('TableName'[DaysInQuery] = ">10",1,2))
User | Count |
---|---|
73 | |
73 | |
39 | |
25 | |
23 |
User | Count |
---|---|
96 | |
93 | |
51 | |
43 | |
42 |