Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello
Can you please assist. I have a bar chart that displays a measure by yearmonth and I have 2 years worth of data on the report. If I haven't selected the year it shows all the 2 years, like below.
I need to default the dashboard to show only the latest year and month on the data, without the user selecting the year on a slicer:
I've tried doing it just for the year on the measure but it's still not displaying correctly (still displays 24 months), how do I go about this? Below is the current measure:
Thank you @Anonymous , but I'm still not getting the results I want. The expression works only when I select a year, see below: and I modified the DAX a bit to suit my needs:
Measure =
var MaxYear = max('Calendar'[Fiscal Year])
RETURN
IF(SELECTEDVALUE('Calendar'[Fiscal Year]) = MaxYear, sum('Branch Scores'[Nr Errors]),
CALCULATE(sum('Branch Scores'[Nr Errors]),
FILTER('Calendar','Calendar'[Fiscal Year] = max('Calendar'[Fiscal Year])
)
))
Then when I deselect the year, I still get 2020 figures on the matrix even though I've specified on the DAX to give me results just for the max year which in this case is 2021. What am I doing wrong?
Hi @Tlotly
I create a sample ,maybe you can refer to it .
Original data:
Then create a measure to return the latest data .
the latest year = CALCULATE(SELECTEDVALUE('Table'[Value]),FILTER('Table',YEAR(SELECTEDVALUE('Table'[Date]))=YEAR(TODAY())))
The effective is as shown (add the measure and date into a bar chart):
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.