Forum Discussion
Anonymous
3 years agoNot applicable
TopN while using duplicate values
Hi everyone, I need your help with the following problem. I need to be able to display the topN cargo ID based on their cycle time. I am trying to use TOPN to display values based on the lowest...
- Anonymous3 years agoAnonymous I have found a solution.For anyone interested, here is the measure that uses a slicer to appoint the Top N.Measure =VAR a =CALCULATETABLE(VALUES('Table'[Cargo ID]),TOPN(SELECTEDVALUE(Slicer[Slicer]),ALLSELECTED('Table'),'Table'[RND Time],ASC))VAR selectedCargoID = SELECTEDVALUE ( 'Table'[Cargo ID] )RETURNIF ( selectedCargoID IN b, 1, 0 )
Anonymous
3 years agoNot applicable
Hey thank you for replying.
This is not exactly the solution I am looking for. Top N should correlate to the amount of units returned; right now it returns 4 values at a maximum.
The desired result would be if Top N is set to 15 to return 15 units based on their lowest times.
I am currently trying something out using AVERAGE('Table'[Cycle Time])+RAND()/100, to create unique time values so that it can be properly displayed. However it doesn't interact well with your measure.
Example:
All possible units.
Filter:
Result:
Note that I am using a different dataset to illustrate.
Can you help me out further?
- Anonymous3 years agoNot applicable
Just to clarify, the example is only to showcase how I'd like the measure to interact with the data in question, nothing more.