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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
mikebi
Helper III
Helper III

PowerBI Example with YTD, MDT and QTD slicer or buttons

Hello,

Does anyone have an example of how to create a power bi pbix file with YTD, MTD and QTD with year and month selections?

Either using a slicer or button is fine.

 

Thank You,

 

Michael

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mikebi ,

Please review the following links, hope it can help you solve the problem.

Custom Date Period Selections in Power BI

vyiruanmsft_0-1710322038020.png

Solved: Slicer MTD, QTD, YTD to filter dates using the sli... - Microsoft Fabric Community

Final Value 1 = 
IF(HASONEFILTER(Table[CalcType]),
    SWITCH(SELECTEDVALUE(Table[CalcType]),
        "MTD", [Measure 1 MTD],
        "QTD", [Measure 1 QTD],
        "YTD", [Measure 1 YTD]
    ),
   BLANK()
)

Best Regards

View solution in original post

3 REPLIES 3
Ninja_Powered
Frequent Visitor

Does the inbuilt slicer functionality work for what you need? If you insert a slicer then change it to relative date in the slider settings then the user can select 'this week' 'this month' & 'this year'.

I really want it to say 'MTD', 'YTD, 'QTD' with user selection.

Anonymous
Not applicable

Hi @mikebi ,

Please review the following links, hope it can help you solve the problem.

Custom Date Period Selections in Power BI

vyiruanmsft_0-1710322038020.png

Solved: Slicer MTD, QTD, YTD to filter dates using the sli... - Microsoft Fabric Community

Final Value 1 = 
IF(HASONEFILTER(Table[CalcType]),
    SWITCH(SELECTEDVALUE(Table[CalcType]),
        "MTD", [Measure 1 MTD],
        "QTD", [Measure 1 QTD],
        "YTD", [Measure 1 YTD]
    ),
   BLANK()
)

Best Regards

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors