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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
chavanr
Resolver I
Resolver I

Creating a WTD/DAY time intelligence slicer in desktop

Hi there,

 

I am creating a time intelligence slicer for YTD/MTD/WTD & DAY calculation.

Wondering if anyone could help with the WTD & DAY calculation

 

Please find below calculation for YTD & MTD.

Dynamic Date Scope =
VAR TodayDate = TODAY()
VAR YearStart = CALCULATE(STARTOFYEAR('Dates for Trends'[MMM YYYY]),YEAR('Dates for Trends'[MMM YYYY]) =YEAR(TodayDate))
VAR MonthStart = CALCULATE(STARTOFMONTH('Dates for Trends'[MMM YYYY]),YEAR('Dates for Trends'[MMM YYYY]) = YEAR(TodayDate),MONTH('Dates for Trends'[Month Year]) =MONTH(TodayDate))
VAR Result=
UNION(
ADDCOLUMNS(
CALENDAR(YearStart,TodayDate),
"Selection", "YTD"
),
ADDCOLUMNS(
CALENDAR(MonthStart,TodayDate),
"Selection","MTD"
)
)
RETURN
Result
1 ACCEPTED SOLUTION
2 REPLIES 2

thanks @amitchandak !!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.