Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi, I'm working on a report where I have to show quarterly data based upon one or multiple years selected from the filter. I want to store the smallest year value for which i have created a measure shared below. Lets say I select year 2024,2025 and 2026 from filter. Now I should get cumulative sum of each quarter with its previous year. If I hardcode year in my dax then it works fine otherwise it cumulate sum for each years individually which I dont want. below are the measures and screenshot of line chart with hardcode value and with measure's value.
(Measure to get smallest year)
(Main Measure)
(Result I am getting using variable having smallest year value)
Solved! Go to Solution.
Hi @MAli_Ch
please try
MinYearSelected =
MINX ( ALLSELECTED ( 'DIM_DATE'[REPORT_YEAR] ), 'DIM_DATE'[REPORT_YEAR] )
Hi @MAli_Ch
please try
MinYearSelected =
MINX ( ALLSELECTED ( 'DIM_DATE'[REPORT_YEAR] ), 'DIM_DATE'[REPORT_YEAR] )
Hi @tamerj1, hope you are doing well. Thanks, your solution worked perfectly.
Just for my understanding can you explain what is the difference between my and your MinYearSelected measure. It seems to be almost same.
ALLSELECTED ignores the filter context of the visual and considers only the outer filter context represented by slicers and page filters etc.
Alright I get it, thanks again
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |