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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Rank Varience

Hi,

 

How would I work out the rank varience in DAX.  I have it under year on table but I want to say if it was rank 5 last year and rank 1 this year it is +4.

 

My Rank code is

 

 

Company Rank:=RANKX(ALL(adTrans[TrueCompany]), SUMX(RELATEDTABLE(Insertbk), [InsertNetCost]))

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Its ok managed to work it out

 

Company Rank Previous Year:=RANKX(ALL(adTrans[TrueCompany]),CALCULATE( SUMX(RELATEDTABLE(Insertbk), [InsertNetCost]),SAMEPERIODLASTYEAR(CalendarNew[Date])))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Its ok managed to work it out

 

Company Rank Previous Year:=RANKX(ALL(adTrans[TrueCompany]),CALCULATE( SUMX(RELATEDTABLE(Insertbk), [InsertNetCost]),SAMEPERIODLASTYEAR(CalendarNew[Date])))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.