Forum Discussion
Create 2 Measures from 2 different slicers
- 7 years ago
Sai_Alkesh can you check wht selected value you get in 2nd measure. It should logically work, without looking at pbix it is very hard to tell what is going on. Do you have any fitler , may be update measure to ALLSELECTED instead of ALL
Sai_Alkesh that's exactly correct, create another table and use that in slicer2.
Sai_Alkesh what is your measure? Can you share?
- Sai_Alkesh7 years ago
Helper II
this is measure 1 based on the selection of value in slicer 1
M1ABS = VAR selection = SELECTEDVALUE('total data'[Calendar Year/Month],0000) return sum('total data'[Abs Error Value Final])Total data is table nameAbs Error Value Final is the column name.so for example, if the user selects Jan 19 from slicer 1, then i fetch the total sum of Abs Error value. Likewise i now need to get the data for user selection in Slicer 2 (if the user selects Feb 19 in slicer 2).How do i create another measure, wherein the selectedvalue should be selections from slicer 2Sorry for the jumbled explanation, but am a newbie on Power BI and exploring most of the commands in here to build my report.- parry2k7 years ago
Super User
Sai_Alkesh here is what you can do, i assumed table name /column name in following, you can change as per your model.
M2ABS = VAR selection = SELECTEDVALUE('2nd Table'[Calendar Year/Month],0000) return CALCUATE( sum('total data'[Abs Error Value Final]), ALL( 'total data' ), 'total data'[Calendar Year/Month] = selection )- Sai_Alkesh7 years ago
Helper II
the formula works, however i get wrong values:
the Abs final values for
Jan 19 are 7.03M
Feb 19 are 7.88M
When i select Jan 19 in slicer 1, i get the correct value of 7.03M
However, when i select Feb 19 in Slicer 2, the measure returns to me value of 179.37M..... this should just be 7.88M