Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Ranking For few columns

Hi 


I have a sample below table, which i hav the data this way.

ProductnameSubcategoryrevenue
Coolershomecooler345
RefregiratorMini refregiration543
FulltotalTotal456
BikesBicycles887
CarsBattery vehicles667

 

Now i want to create two rank

1.) based on Revenue for Product category

2.) based on Revenue for subcategory

 

When i create a RANK for Product category, my condition is "Fulltotal" should not be included in the Rank which always need to come last

 

When i create a RANK for Subcategory, my condition is "Total" should not be included in the Rank which always need to come last

 

SO my out put should be like this , Even though Total is high it is coming as Last, How to write the DAX for the below

 

 

ProductnameSubcategoryrevenueRankProdRankSub
BikesBicycles88711
CarsBattery vehicles66722
RefregiratorMini refregiration54333
Coolershomecooler34544
TotalTotal45655

 

Thanks,

2 Replies