Forum Discussion
Anonymous
6 years agoNot applicable
SELECTEDVALUE in Direct Query from SAP BW
Hi, Currently, I am using the data from SAP BW source using Direct Query method. My requirement is : We have multiple slicers regarding Month, Quarter , Year in report and One card should be added ...
- 6 years ago
Hi Anonymous ,
You could create a measure like the formula below. The values that are from the two functions need to be matched with your slicer. And for multiple slicers in your report, you could change IF function to SWITCH.
Month &Year = var Mon = SELECTEDVALUE('Table'[Month]) var Ye = SELECTEDVALUE('Table'[YEAR]) return IF(ISFILTERED('Table'[Month]) && ISFILTERED('Table'[YEAR]),Mon&" & "&Ye,BLANK()) Quarter & Year = var Quar = SELECTEDVALUE('Table'[Quarter]) var Ye = SELECTEDVALUE('Table'[YEAR]) return IF(ISFILTERED('Table'[Quarter]) && ISFILTERED('Table'[YEAR]),Quar&" & "&Ye,BLANK())Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
Community Support
6 years agoHi Anonymous ,
You could create a measure like the formula below. The values that are from the two functions need to be matched with your slicer. And for multiple slicers in your report, you could change IF function to SWITCH.
Month &Year =
var Mon = SELECTEDVALUE('Table'[Month])
var Ye = SELECTEDVALUE('Table'[YEAR])
return
IF(ISFILTERED('Table'[Month]) && ISFILTERED('Table'[YEAR]),Mon&" & "&Ye,BLANK())
Quarter & Year =
var Quar = SELECTEDVALUE('Table'[Quarter])
var Ye = SELECTEDVALUE('Table'[YEAR])
return
IF(ISFILTERED('Table'[Quarter]) && ISFILTERED('Table'[YEAR]),Quar&" & "&Ye,BLANK())
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.