cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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 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
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 63 members 1,255 guests
Please welcome our newest community members: