Forum Discussion
Slicer with measures ?
Hi,
You could take this approach.
Create a table called Measures. The contents will be
MeasureName , MeasureID as column names
The rows will be
Gross Revenue , 1
Net Revenue , 2
Create a measure in the data model as follows :
Showvalue=switch (TRUE,
Min ( Measures[MeasureID] ) = 1,
( [SalesQty] ), /* replace this by your fomula for Gross Revenue or if already exists put that measurename */
Min ( Measures[MeasureID] ) = 2,
( [Sales] ) ) /* replace this by your fomula for Net Revenue or if already exists put that measurename */
Now create a slicer with Measure table column MeasureName .
In the chart or table , use the measure Showvalue as your values column to chart or display in table.
and you will have the results.
Best
Cheenusing
I have tried several variations of this approach with MeasureID being in one table and SalesQty being in an unrelated table (within a Tabular model). The calculated column (measure) does not fail, but the slicer on MeasureID has no affect in Power BI. Am I missing something? Is it possible to slice a value from an unrelated table?
- GayatriCH9 years agoNew Member
Hi,
I am also having an issue with slicer pointing to calcualted measure. Is there a way to create a slicer in power bi that points to calculated measure?
Thanks,
Gayatri