Forum Discussion
Compare price
- 7 years ago
Should be able to use the same basic concept to create a flag variable. First, don't connect your slicer to your table. Then create a flag measure like:
Measure Flag = VAR __selected = MAX('Table'[Column]) //value from slicer RETURN IF(MAX([Country]) = __selected,0,1)Filter on this measure.
- 7 years ago
Hi Anonymous,
Create a calculated table which lists all slicer selections. This table should be unrelated to source data table.
slicerTable = VALUES('TB1'[Country])Add below measure to visual level filters, set its value to 0.
check = IF(SELECTEDVALUE(slicerTable[Country])=SELECTEDVALUE(TB1[Country]),1,0)
To calculate the price of selected country as a comparison, please create below measure.
value for selected country = CALCULATE(SUM(TB1[Price]),FILTER(TB1,TB1[Country]=SELECTEDVALUE(slicerTable[Country])))
Best regards,
Yuliana Gu
Hi Anonymous,
Create a calculated table which lists all slicer selections. This table should be unrelated to source data table.
slicerTable = VALUES('TB1'[Country])
Add below measure to visual level filters, set its value to 0.
check = IF(SELECTEDVALUE(slicerTable[Country])=SELECTEDVALUE(TB1[Country]),1,0)
To calculate the price of selected country as a comparison, please create below measure.
value for selected country = CALCULATE(SUM(TB1[Price]),FILTER(TB1,TB1[Country]=SELECTEDVALUE(slicerTable[Country])))
Best regards,
Yuliana Gu