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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
amitchandak
Super User
Super User
2 REPLIES 2
amitchandak
Super User
Super User

thanks @amitchandak !!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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