cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Matrix rows values from different dates and 1 column header

I'm creating a Matrix where the measures depend on 3 different dates -- See below. I need to show the Month in the column formatted as shown below for the corresponding month. 

 

I have tried so many options and have failed so far. Any help or ideas will be greatly appreciated. 

PS. For my measures  I'm using row context. Ideally I was thinking of a date calculated column that could filter all my 3 dates, but has not been succesful. 

 

MatrixMatrix

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Matrix rows values from different dates and 1 column header

One way to do this sort of thing is to create multiple relationships to your date table. (you should definitely have a separate 'date' table  with a contiguos list of dates in it to do this sort of thing). If you don't already have a date table in your model you could use something like this template to help create one

 

But because 2 tables can only have 1 active relationship between them you would choose 1 of these as your active relationship, Then the other relationships can be activeated within specific measures that need them with the USERELATIONSHIP function.

 

So assuming that the Sales Date was the active relationship you could write the [Closings] measure as follows (I'm using 'Opportunites' as the name of your main table here so you may need to changes this for your actual table name)

 

Closings = CALCULATE( SUM( Opportunities[Closings], USERELATIONSHIP( Opportunities[Closing Date] , 'Date'[Date] ) )

 

Where as [Sales] (which has the active relationship) can simply be as follows without the CALCULATE( ... ,  USERELATIONSHIP(...)) wrapper: 

 

Sales = SUM( Opportunities[Sales] )

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Matrix rows values from different dates and 1 column header

One way to do this sort of thing is to create multiple relationships to your date table. (you should definitely have a separate 'date' table  with a contiguos list of dates in it to do this sort of thing). If you don't already have a date table in your model you could use something like this template to help create one

 

But because 2 tables can only have 1 active relationship between them you would choose 1 of these as your active relationship, Then the other relationships can be activeated within specific measures that need them with the USERELATIONSHIP function.

 

So assuming that the Sales Date was the active relationship you could write the [Closings] measure as follows (I'm using 'Opportunites' as the name of your main table here so you may need to changes this for your actual table name)

 

Closings = CALCULATE( SUM( Opportunities[Closings], USERELATIONSHIP( Opportunities[Closing Date] , 'Date'[Date] ) )

 

Where as [Sales] (which has the active relationship) can simply be as follows without the CALCULATE( ... ,  USERELATIONSHIP(...)) wrapper: 

 

Sales = SUM( Opportunities[Sales] )

View solution in original post

Highlighted
Frequent Visitor

Re: Matrix rows values from different dates and 1 column header

Hello sir, read about that, but I was not sure how to use it. Based on your explanation it made all sense and was able to implement what I needed.

 

Thank you for your help!

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors