Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
VickyDev18
Advocate II
Advocate II

Modify MTD, YTD, FY behavior in a table with months

I have created standard MTD, YTD, FY measures as shown below as calcualted items in a calculation group.

 

MTD = CALCULATE(SELECTEDMEASURE(), DATESMTD('Date'[Date]))
YTD = CALCULATE(SELECTEDMEASURE(), DATESYTD('Date'[Date]))
FY = CALCULATE(SELECTEDMEASURE(), ALLEXCEPT('Date', 'Date'[Year]))


I'd like to know if it's possible to modify the behaviour of these measures such that they show values as shown below when a month is part of the table. Sample File Link

 

VickyDev18_0-1716132748995.png

 

 

3 REPLIES 3
TomMartens
Super User
Super User

Hey @VickyDev18 ,

 

please describe in more detail what you mean by "behave."

 

Next, when I remove the selection of May it becomes apparent that "FY" does not show the same values as in the image. What is the expectation/business rule for FY.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

FY should basically show the full year total when a month is NOT part of the visual or more specifically the row in the visual e.g. total row, but when month is in the row it should the monthly value.   

Anonymous
Not applicable

HI @VickyDev18,

You cna add if statement to check the current hierarchy level and redirect to different calculation expression and output correspond result based on current hierarchy level.

Clever Hierarchy Handling in DAX - SQLBI

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.