Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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,
Happy to help!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |