This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I've got a category value (CAT) stratified into date periods divisions (DATE) (e.g. week 1, week 2 etc), I've created a measure to rank them by DATE the number of sales each CAT is making
e.g.
| CAT | DATE | SALES | RANK |
| A | 1 | 10 | 3 |
| B | 1 | 20 | 2 |
| C | 1 | 30 | 1 |
| A | 2 | 10 | 3 |
| B | 2 | 20 | 2 |
| C | 2 | 30 | 1 |
| A | 3 | 40 | 1 |
| B | 3 | 20 | 3 |
| C | 3 | 30 | 2 |
I want to create an additional measure or table to show the change in rank from the minimum to maximum of date Value but I'm at a complete loss. I tried creating a second table with the intention of usings LOOKUPVALUE using min/max on the date field but you can't lookup to measures, only columns.
Help please!
i.e.
| CAT | RANK CHANGE |
| A | -2 |
| B | +1 |
| C | +1 |
Solved! Go to Solution.
Hi @Anonymous
You may create measures like below:
Max_Rank =
CALCULATE (
[Rank],
TOPN ( 1, ALLEXCEPT ( Table2, Table2[CAT] ), Table2[DATE], DESC )
)
Min_Rank = CALCULATE([Rank],TOPN(1,ALLEXCEPT(Table2,Table2[CAT]),Table2[DATE],ASC))
RANK CHANGE = [Max_Rank]-[Min_Rank]
Regards,
Cherie
Hi @Anonymous
You may create measures like below:
Max_Rank =
CALCULATE (
[Rank],
TOPN ( 1, ALLEXCEPT ( Table2, Table2[CAT] ), Table2[DATE], DESC )
)
Min_Rank = CALCULATE([Rank],TOPN(1,ALLEXCEPT(Table2,Table2[CAT]),Table2[DATE],ASC))
RANK CHANGE = [Max_Rank]-[Min_Rank]
Regards,
Cherie
I don't suppose it is possible to do this solutions but when the data is in 2 different tables as opposed to one?
I am trying to highlight rank change between the 2 tables below...
Thanks,
Use:
measure =
var
table3 = union(table1, table2)
return
<dax for dax measure goes here using table 3 as reference>
Perfect, thanks.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 24 | |
| 23 |