Forum Discussion
aquanr18
7 years agoFrequent Visitor
Creating a Rank for each Item By Custumer
Hi! tnx a lot for reading my post, My goal is to obtain the row TOP in powerr bi using rankx, This is a rank for each item by customer in the same table....
- 7 years ago
aquanr18 Please try this as a "New Column"
Top = RANKX(FILTER(Test58Rank,Test58Rank[Client]=EARLIER(Test58Rank[Client])),Test58Rank[Sales],Test58Rank[Sales],DESC)
LivioLanzo
7 years agoSolution Sage
I guess you wanna do it as a calculated column:
Ranking =
VAR Sls = Sales[Sales]
RETURN
CALCULATE(
RANKX(
Sales,
Sales[Sales],
Sls
),
ALLEXCEPT( Sales, Sales[Cliente] )
)aquanr18
7 years agoFrequent Visitor
Hi! thanks ! but the formula has something wrong
I got the error "A single value form column 'Sales' in the table 'Sales' cannot be determined. This can happen when a measure formula refers to a column that contains many values without an aggregation such as min, max, count or sum to get a single result'
I tryed to agreggate the sales by SUM but got nothing out of the formula.
What should I do?
- LivioLanzo7 years agoSolution Sage
- aquanr187 years agoFrequent Visitor
I have try both, in the measure i got the previus error,
If I use a calculated the error is 'Function 'RANKX' dose not support comparing values of type text with values of type integer, consider using the value or format function to convert one of the values'
- LivioLanzo7 years agoSolution Sage