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
Anonymous
Not applicable

Yearly / Monthly / Weekly cumulative for all measures in the model

Hey,

 

I would love to know if possible and how i am select one date in one table to filter another table time between two date

for example : i select 15/2/2021 in one calender table and in another table(linked to data model) select time between 1/2/2021 - 15/2/2021.

 

Using this I can put metrics in the sample model: sales, buying, discount, etc.

and they will be calculated according to the selected dates

 

i would love to do this at At the yearly / monthly / weekly level

 

This calendar I use in my model

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , For this case this table you are selecting date should be independent

"i select 15/2/2021 in one calender table and in another table(linked to data model) select time between 1/2/2021 - 15/2/2021"

example 

MTD =
var _max = maxx(allselected([IDate]), 'IDate'[Date])
var _min = date(year(_max),month(_max),1)
return
calculate(sum('Table'[value]), filter('Table', 'Table'[Date] >= _min && 'Table'[Date] <=_max))

 

MTD is a better option

Anonymous
Not applicable

TransactionDate
DayNumberInWeek
DayShortName
WeekNumber
WeekStartDate
WeekEndDate
MonthNumber
MonthStartDate
MonthEndDate
QuarterNumber
CalendarYear
TransactionDateLY

Anonymous
Not applicable

Hey 

thanks for your answers

i need something for all the measures 

i will not would to create for all the measures in my model MTD/YTD

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.

Top Solution Authors