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
HenryJS
Post Prodigy
Post Prodigy

Matrix

Hi all,

 

How can I get a matrix with Week Ending along columns but link to a table with two different date fields?

 

As below I linked the calendar table to 'MOT Expires' but this causes the 'Service Due' field to fall into the wrong date on the matrix.

 

Please see below example for GXZ 2918. 

 

I would like to have a matrix with week endings along columns and be able to drop in date fields from multiple fields.

 

Vehicle Reg MOT expiresService Due 
DXZ 964221/01/202122/01/2021
EXZ 594625/06/202123/01/2021
EXZ 663702/06/202124/01/2021
EXZ 663811/06/202125/01/2021
EXZ 663925/10/202026/01/2021
EXZ 664003/06/202127/01/2021
GXZ 291827/09/202001/09/2020

 

 

Capture.PNG

 

 

 

 

1 ACCEPTED SOLUTION

@HenryJS, see if this can solve the purpose

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@HenryJS , Have a month or week table with dates . No need to join

And use measures like this for these dates

MOT expires measure = minx(filter(table,[MOT expires] <=Date[Date] && [Service Due] >= Date[Date]),[MOT expires] )
Service Due measure = maxx(filter(table,[MOT expires] <=Date[Date] && [Service Due] >= Date[Date]),[Service Due] )

 

The week on column   and Vehicle Reg  on row

 

Calendar with week

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

@amitchandak it did not work with the measure you sent - please see below

 

MOT expires measure = minx(filter('Vehicle Fleet Data',[MOT expires] <= 'calendar'[Date] && 'Vehicle Fleet Data'[Estimate Month Service Due] >= 'calendar'[Date]),'Vehicle Fleet Data'[MOT expires] )
 
Capture.PNG

@HenryJS , My mistake

Try like

MOT expires measure = minx(filter(table,table[MOT expires] <=max(Date[Date]) && table[Service Due] >= max(Date[Date])),table[MOT expires] )
Service Due measure = maxx(filter(table,table[MOT expires] <=max(Date[Date]) && table[Service Due] >= max(Date[Date])),table[Service Due] )

@amitchandak none of the dates appeared in the matrix!

 

please see below

 

Capture.PNG

@HenryJS, see if this can solve the purpose

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.