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

Matrix Table - Group first column by date, keeps detailed rows for columns

Hello, 

 

Is it possible to build a matrix table that would read:

 

lfarrugia_0-1593021393374.png

 

 

Out of data that is like this:

 

DateTime startTime EndsSessionSpeakerPurpose
6.24.2012:00 PM1:00 PMLove of catsMiaowtonA group of people who love cats talk about their love
6.24.201:00 PM2:00 PMcat biologyDr. PurfectThe details of the organisms of cats
6.25.208:00 AM9:00tea w/ catsAllcome join us in a cat tea brunch
6.26.2010:00 AM12:00 PMclosing catnoteKat KrispiesClose out the conference

 

I'm unable to build the matrix table to group the "Date" column data. 

 

Could someone please help me?

 

Thank you,

 

L

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Please check if the following one is what you want:

1. Sort the column Date and Time start by ascending in Power Query Editor

2. Add index column from 1 in Power Query Editor

sorted rows and add index.JPG

3. Create a calculated column to get new Date field(if current date is equal to the previous date, then not display. Otherwise, display the corresponding date)

Ndate = 
VAR _predate =
    CALCULATE (
        MAX ( 'Matrix'[Date] ),
        FILTER ( 'Matrix', 'Matrix'[Index] < EARLIER ( 'Matrix'[Index] ) )
    )
RETURN
    IF ( 'Matrix'[Date] = _predate, BLANK (), 'Matrix'[Date] )

Note: The table visual need to sort by Index column, you can hide it by dragging this column...

create calculated column.JPG

I just created a sample pbix file for you, you can get it from this link for full detail.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Please check if the following one is what you want:

1. Sort the column Date and Time start by ascending in Power Query Editor

2. Add index column from 1 in Power Query Editor

sorted rows and add index.JPG

3. Create a calculated column to get new Date field(if current date is equal to the previous date, then not display. Otherwise, display the corresponding date)

Ndate = 
VAR _predate =
    CALCULATE (
        MAX ( 'Matrix'[Date] ),
        FILTER ( 'Matrix', 'Matrix'[Index] < EARLIER ( 'Matrix'[Index] ) )
    )
RETURN
    IF ( 'Matrix'[Date] = _predate, BLANK (), 'Matrix'[Date] )

Note: The table visual need to sort by Index column, you can hide it by dragging this column...

create calculated column.JPG

I just created a sample pbix file for you, you can get it from this link for full detail.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@Anonymous 

 

Maybe try duplicating the table and deleting all columns except Date and Time Start.

 

Group by date. With Time Start at max/min/whatever. Doesn't matter. 

 

Then delete time. 

 

Then merge with the other table and bring in all the other colums?

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.