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
ibarrau Established Member
Established 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
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 280 members 2,746 guests
Please welcome our newest community members: