Forum Discussion
Ranking Cumulative Total
- 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])
Nick,
I appreciate the feedback and support, the formula is working slightly when I use ALLSELECTED(), However the ranking is still not correct when comparing the total quantity of a part number.
Any suggestions?
can you post some data?
- nnouchi7 years ago
Helper I
The 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.
- Anonymous7 years agoNot applicable
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])- nnouchi7 years ago
Helper I
Thanks Nick, I found out the reason behind why it was originally showing in order, I had negative quantities in my table that were being calculated in the ranking and that I needed to filter within the report. I appreciate the help.
- Anonymous7 years agoNot applicable
no problem. ill just use some dummy data from the sample DBs that msft puts out.