Forum Discussion
Measure in Slicer
Hi Team,
I have the below measure and need to use in the Slicer but unable to do. Could you pleaes help.
I am creating the Rank measure on Average column and then Range measure (or precentile) as above.
Anonymous
amitchandak
SivaMani
Icey
Thank you,
Paramjit
Paramjit, Try the below approach and let me know if it meets your requirement,
- Keep [Rank 2] Measure
- Create a table
- Check the below logic and create a measure
Range = VAR __Max = MAXX( ALL(<TableName>[ColumnName]),[Rank 2]) VAR __SelValue = SELECTEDVALUE('Table'[Name]) VAR __Perc = DIVIDE([Rank 2],__Max) RETURN SWITCH( TRUE(), __SelValue = "Long" && __Perc > .67,"Y", __SelValue = "Medium" && __Perc > .33, "Y", __SelValue="Short", "Y" )- Add Range to Visual Level Filter and apply Range is 'Y'
- Add Name(from step 2) to slicer
- Test it
Hope it will help you!
Best Regards, Siva Mani Proud to be a Super User! If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- amitchandakSuper User
Paramjit , For slicer you have create an independent table with these value and then filter it in a measure
assume table name RangeBucket
New measure = sumx(filter(Values(Table[Run ID]), [Range] = max(RangeBucket[Value]) ), CALCULATE(SUM('Table'[Average])) )
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k- ParamjitHelper II
i tried the same but it is duplicating the values.
I am not able to filter out the null values. Please suggest.
itchandak
- SivaManiResident Rockstar
Paramjit, Try the below approach and let me know if it meets your requirement,
- Keep [Rank 2] Measure
- Create a table
- Check the below logic and create a measure
Range = VAR __Max = MAXX( ALL(<TableName>[ColumnName]),[Rank 2]) VAR __SelValue = SELECTEDVALUE('Table'[Name]) VAR __Perc = DIVIDE([Rank 2],__Max) RETURN SWITCH( TRUE(), __SelValue = "Long" && __Perc > .67,"Y", __SelValue = "Medium" && __Perc > .33, "Y", __SelValue="Short", "Y" )- Add Range to Visual Level Filter and apply Range is 'Y'
- Add Name(from step 2) to slicer
- Test it
Hope it will help you!
Best Regards, Siva Mani Proud to be a Super User! If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.