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
bhavana097
Frequent Visitor

Matrix table to show data until selected month filter only

Hello, 
I'm looking for a solution where a matrix displays data until the selected month on the slicer
Picture says it all: 
For example if select November, I want to see the data until November month & overall sum in total column until november

Table.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bhavana097 , Ideally it should be month year coming from an independent date table

 

when it month year from date table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

 

when it only the month name and date table having month number too

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Month no])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Month no] <=_max))

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@bhavana097 , Ideally it should be month year coming from an independent date table

 

when it month year from date table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

 

when it only the month name and date table having month number too

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Month no])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Month no] <=_max))

 

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.