Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |