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.
Hello,
I have a question I'd like to raise so that I can resolve it. As you can see in the table I would like to add a column (RANKX ORDER LY) where appears the ranking of last year's products that had the same order as this year's products.
The RANKX and RANKX LY columns work perfectly.
YEAR | PRODUCT | QTY | RANKX | ||
2018 | PEPSI | 50 | 1 | ||
2018 | COCA COLA | 45 | 2 | ||
2018 | ORANGE | 30 | 3 | ||
2018 | PEPSI MAX | 25 | 4 | ||
2018 | COCA COLA ZERO | 10 | 5 | ||
RANKX | RANKX LY | RANKX ORDER LY | |||
2019 | COCA COLA | 55 | 1 | 2 | PEPSI |
2019 | PEPSI MAX | 40 | 2 | 4 | COCA COLA |
2019 | PEPSI | 35 | 3 | 1 | ORANGE |
2019 | COCA COLA ZERO | 30 | 4 | 5 | PEPSI MAX |
2019 | ORANGE | 28 | 5 | 3 | COCA COLA ZERO |
Thanks
Hi @bestevez
Not sure if I'm over simplifying things but I think you could use the LOOKUPVALUE function as follows.
RANKX ORDER LY = LOOKUPVALUE ( 'Table'[PRODUCT], 'Table'[RANKX LY], 'Table'[RANKX] )
Best regards,
Martyn
Hello.
I do have a suggestion, albeit not a particularly elogant solution...
To achieve the table shown I would suggest first create the RANKX formula in your data table:
You can then use this to create a calculated table as follows:
Thanks i try it.
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 |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
46 | |
31 | |
30 | |
18 | |
18 |