cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Periksson Frequent Visitor
Frequent Visitor

Dynamically Comparing Two Years

So I want to dynamically choose two years I want to compare for a measure, in my case - profit.
I made a DAX measure to calculate profit for A year, for example:

Profit LY = CALCULATE([Profit]; Year[Year] = 2018 )

but I want to calculate the profit for a year I pick via a slicer. Is that achievable?

1 REPLY 1
Highlighted
ibarrau Senior Member
Senior Member

Re: Dynamically Comparing Two Years

Hi. It is not something I would recommend to have a measure from slicer, but you can solve this with SELECTEDVALUE.


Here is some doc:

https://docs.microsoft.com/en-us/dax/selectedvalue-function

https://dax.guide/selectedvalue/

 

Regards,

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,211)