Forum Discussion
Hide value
- 8 years ago
Hello,
I couldn't test 'Dense' last week so I did it today.
My Measure is TopN:=CALCULATE(MAX(Test_Rank[Data]);FILTER(Test_Rank;RANKX(Test_Rank;[Data];;;Dense)=Top_3[MaxN]))
This is my over all:
For me it looks like it is supposed.
Hello,
Your MaxN is wrong. I ignored your calculated column and tried to build an independent measure only needing the columns category, sub category and Data.
MaxN should relate to an independent table, which helps you to create Max1, Max2, Max3.
If you want to display Situation 1 only if now Sub Category is selected, maybe this helps:
Situation 1: IF(NOT(HASONEVALUE([Sub Category])),[TopN],BLANK())
Situation 2: IF((HASONEVALUE([Sub Category])),[TopN],BLANK())
Maybe this helps.
Hi Floriankx,
I'm confuse with MaxN
How I get Max1, Max2 & Max3
can u please sent a screenshot
Regards,
NICK
- Floriankx8 years agoSolution Sage
Hello, I do have them as column in my pivot table.
A is sliced.
- Naveennegi1198 years agoHelper III
- Floriankx8 years agoSolution Sage
Hello I try to walk you through:
I have a table (extract of your big one) Test_Rank
Sub Sub Category Data A GH 99 B IJ 96 B IJ 95 A CD 94 A EF 90 B KL 89 A EF 87 A GH 95 Then I do have another table Top_3
Top 3 1 2 3 Tables are not related.
In Top_3 i have the measure MaxN:=MAX(Top_3[Top 3])
In Test_Rank I have TopN:=CALCULATE(MAX(Test_Rank[Data]);FILTER(Test_Rank;RANKX(Test_Rank;[Data])=Top_3[MaxN]))
MAX is just for aggregation, Filter should return only one value but it has to be wrapped by aggregation funtion (Min, Max, Sum, etc. I don't recommend Sum in case Filter returns more values, duplicats e.g.)
Filter is for Filtering. RANKX ranks your Data. In combination only the value is filtered of TopN value is selected depending on MaxN.
If I create PivotTable with this data it returns the result as shown before. I hope things are clearer now.
Best regards.