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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors