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
andyor
Resolver I
Resolver I

Pivot Rows on Matrix Visualization Month + 1

I have a dataset in the following format. Notice InitialDate of July 2022 has 1 corresponding row of RollingDate and Churn, June 2022 has 2 corresponding rows, May has 3 etc etc

 

andyor_0-1661069340385.png

 

And I want to display the results in a matrix like this. 

 

andyor_1-1661069637940.png

 

The problem I'm finding it that if I just use the RollingDate as Columns and Churn as the Values, it looks like this

 

andyor_3-1661069768290.png

 

But what I want is this

 

andyor_2-1661069740863.png

 

Any help greatly appreciated

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@andyor 

First, add a Rank column to your table as follows:

Rank = 
VAR __InitialDate = 'Table4'[InitialDate]
RETURN
RANKX(
    FILTER( Table4 , Table4[InitialDate]  = __InitialDate ),
    Table4[RollingDate],
    ,ASC
)-1

Visualize on a Matrix visual as follows

Fowmy_0-1661076706487.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@andyor 

First, add a Rank column to your table as follows:

Rank = 
VAR __InitialDate = 'Table4'[InitialDate]
RETURN
RANKX(
    FILTER( Table4 , Table4[InitialDate]  = __InitialDate ),
    Table4[RollingDate],
    ,ASC
)-1

Visualize on a Matrix visual as follows

Fowmy_0-1661076706487.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks @Fowmy 

 

I got on the right track with a much more crude solution than yours but got stuck again. 

 

How does one switch true() for comparing month + 1, month + 2 etc?

 

andyor_0-1661077297345.png

 

Finally, how can I display 'Original' in Rows to the right of Initial Date?

 

andyor_0-1661078324809.png

 

 

If I just add to Rows they automatically go into a dropdown... Thanks in advance. Subbed your youtube and look forward to going through your videos!!

 

 

andyor_1-1661078392650.png

 

Expected: 

 

andyor_2-1661078553413.png

 

 

@andyor 

Thanks:)
You can turn off the Step Layout under the Matrix Properties

Fowmy_0-1661078641445.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.