cancel
Showing results for 
Search instead for 
Did you mean: 
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 IV
Super User IV

@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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors