Forum Discussion
Help with the Dax Expression.
- 6 years ago
Hi Anonymous ,
Update the formula as below.
Measure 2 = VAR maxp = MAX ( 'Table'[req total pos] ) VAR kk = TOPN ( maxp, FILTER ( 'Table', 'Table'[Elim or keep] <> "Elim" ), 'Table'[Ass Number], ASC ) VAR c = CALCULATE ( MAX ( 'Table'[Ass Number] ), KEEPFILTERS ( kk ) ) RETURN CALCULATE ( MAX ( 'Table'[Diff] ), FILTER ( 'Table', 'Table'[Ass Number] = c ) )
Thank you for your response.
Let me explain the "15" -
I get 4 rows after selecting "9" from the slicer
Then I filter rows with just values "Keep" - I get 3 rows now.
Then I would look for the Min value in the Req total pos column - which will give me "2"
Let's keep "n=2"
Then I would look for the "nth" distinct assignment number which is 901(2nd distinct value). [1st distinct value = 900, 2nd distinct value = 901]
Then I would look for the max value in the Diff column correspondig to "901"
Hence it would be "15"
Hope this helps!
Anonymous got it, all these are column in your dataset or there are calculated measure. Just want to make sure I understood the dataset correctly.
- Anonymous6 years agoNot applicable
Thanks for your response.
Elim or Keep , Req total pos , Diff -- these three columns are calculated columns.
Other three columns are from dataset.
Hope this helps
Thanks!
- parry2k6 years agoSuper User
Anonymous it helps, so basically there is no calculated Measure
- Anonymous6 years agoNot applicable
yeah, No measures involved