Forum Discussion
hvshalihotri
3 years agoFrequent Visitor
KPI value for multi-select months in slicer
Hi Everyone, I wanted to visualize current month data with respect to last month to compare the performance of a metric and I am using KPI card for that. This is working fine when I am using current...
- Anonymous3 years ago
Hi hvshalihotri ,
You can try the following dax:
Measure = var _selectyear=SELECTEDVALUE('Table'[Date].[Year]) var _selectmonth=SELECTCOLUMNS('Table',"1",'Table'[Date].[Month]) return SUMX( FILTER(ALL('Table'), YEAR('Table'[Date])=_selectyear&&'Table'[Date].[Month] in _selectmonth),[Value])Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi hvshalihotri ,
You can try the following dax:
Measure =
var _selectyear=SELECTEDVALUE('Table'[Date].[Year])
var _selectmonth=SELECTCOLUMNS('Table',"1",'Table'[Date].[Month])
return
SUMX(
FILTER(ALL('Table'),
YEAR('Table'[Date])=_selectyear&&'Table'[Date].[Month] in _selectmonth),[Value])
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.