Forum Discussion
Slicer Visualization
- 10 years ago
Anonymous you can create a measure and use HASONEVALUE and FIRSTNONBLANK in conjunction to achieve this. Check out this example I've provided.
Anonymous you can create a measure and use HASONEVALUE and FIRSTNONBLANK in conjunction to achieve this. Check out this example I've provided.
- Anonymous10 years agoNot applicable
Hi ankitpatira,
That works fine i tried following expression in a measure
Title = IF(HASONEVALUE(Table[Year]),FIRSTNONBLANK(Table[Year],TRUE),0)
I am getting 2015 or 2014 depending upon my selection
but i want to use it like this
1. CALCULATE(Fact[Revenue],FILTER(Table,Table[Year] = [Title])) as 'Current Year Revenue'
2. CALCULATE(Fact[Revenue],FILTER(Table,Table[Year] = [Title]-1)) as 'Previous Year Revenue'
when i select 2015 in the slicer
1 is coming but there is no data for 2.
did i miss anything?
the chart will display both the measures in value section
Categories: Months
Values: Current Year Revenue
Previous Year Revenue