Forum Discussion
DanCasSan
Helper V
6 years agoUse measure as filter
Hello community! Could someone guide me a little with this case? I am working on a measure as a filter to show a bar comparison, but what happens if I choose more than one option in the filter? I...
- 6 years ago
Following MFelix idea of a measure table, if you need multiple selection, you can create a measure for each calculation along the lines of (This example is with my measures):
Sales 2018 (sel) = VAR calc = CALCULATE(DISTINCTCOUNT('Select Measure'[Selected Measure]); FILTER('Select Measure'; 'Select Measure'[Selected Measure]= "Sales 2018")) RETURN IF(ISBLANK([Countrows Select Measure]); BLANK() ; IF(calc= 1; [Sales 2018]; BLANK()))Which gets you this:
Attached is the PBIX file:
DanCasSan
Helper V
6 years agoHi Miguel, I did what you recommended, but when I select more than one option, no information comes out. I enclose the image for more detail.
Measure =
SWITCH(
SELECTEDVALUE(DS_KPI_Unid[ID]),
1,[Consumo Real Und.],
2,[Ingreso Real Und.],
3,SUM(DS_MPSMRP[BDMNG]),
4,SUM(DS_MPSMRP[GSMNG]))