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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.