Forum Discussion
nnouchi
Helper I
7 years agoRanking Cumulative Total
Greetings PBI Community, I'm having issues with figuring out how to write a DAX formula that would calculate the rank of different part_numbers based off of their cumulative total. This is m...
- Anonymous7 years ago
I see what I did, the ALL needs to be ALL ( Table[column] ) not just ALL ( Table). So using the Contoso DB:
We have colors on rows, so that is the inital filter context. Have a measure to count the # of products from the products table. So with colors on rows, we will get the amount of products filtered by the color.
Base Measure:
Total Products = COUNTROWS('Product')Rank Measure:
RANK = RANKX( ALL( 'Product'[Color]), [Total Products])Using ALLSELECTED will give a "local" rank vs. a "global" rank of using ALL:
RANK Using AllSelect = RANKX( ALLSELECTED( 'Product'[Color]), [Total Products])
nnouchi
Helper I
7 years agoThe data I am working is unfortunately confidential and I would be breaching my company's external data sharing policy.
I'm only using one table with a quantity amount column and text-based part number column.
Anonymous
7 years agoNot applicable
no problem. ill just use some dummy data from the sample DBs that msft puts out.