Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

how to view rank change over time?

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.

 

CATDATESALESRANK
A1103
B1202
C1301
A2103
B2202
C2301
A3401
B3203
C3302

 

 

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.

CATRANK CHANGE
A-2
B+1
C+1
1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

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]

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-cherch-msft
Microsoft Employee
Microsoft Employee

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]

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi  @v-cherch-msft 

 

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...

 

Untitled2.png

 

Thanks,

 

 

Anonymous
Not applicable

Use:

 

measure = 

var

table3 = union(table1, table2)

return

<dax for dax measure goes here using table 3 as reference>

 

 

Anonymous
Not applicable

Perfect, thanks. 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.