Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Bea8
Regular Visitor

Power BI Built Matrix table

Hi,

I'm new to Power BI and I'm seeking guidance on the best approach for the following situation.

Situation:
The data that I have looks like this:

Screenshot 2024-10-23 at 5.09.59 PM.png

 

 

And I need to create a report that looks like this:

 

Screenshot 2024-10-23 at 5.13.33 PM.png

I was thinking of using the matrix feature for the report.
But not sure if i need to transform or maybe create new tables under the query to be able to create the report previously mentioned.
Because these are some of my concerns:
How to get the count of "Done?" for each Name_2.
How do get the date of the week (for example it has to be the beginning of the week)

 

Sorry for all the questions, but any help or guidance will be appreciated!

thank you! 

1 ACCEPTED SOLUTION

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @Bea8 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_1-1729833735785.png

2.Create calculated column references:

SortColumn = 
VAR c2 =
    RANKX (
        'Table',
        WEEKNUM ( 'Table'[Date Done] ),
        WEEKNUM ( 'Table'[Date Done] ),
        DESC,
        DENSE
    )
RETURN
    IF ( ISBLANK ( 'Table'[Date Done] ), BLANK (), "week" & c2 )

3.Below are the measure I've created for your needs:

Measure = CALCULATE(COUNT('Table'[Done?]),'Table'[Done?]="Yes")

4.Then, apply the column to the matrix view:

vlinyulumsft_2-1729833811214.png

4.Next, modify the layout in the following position:

vlinyulumsft_3-1729833811216.png

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_4-1729833824686.png

Please find the attached pbix relevant to the case.

 
 

Best Regards,

Leroy Lu

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

5 REPLIES 5
lbendlin
Super User
Super User

The general approach is to unpivot your data to bring it into a usable format.  Then the matrix visual will "just work".

 

Where is the week information in your sample data?

sorry I didn't include that, i don't have "week" but I do have "Date Done" 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

thank you!! very helpful!

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @Bea8 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_1-1729833735785.png

2.Create calculated column references:

SortColumn = 
VAR c2 =
    RANKX (
        'Table',
        WEEKNUM ( 'Table'[Date Done] ),
        WEEKNUM ( 'Table'[Date Done] ),
        DESC,
        DENSE
    )
RETURN
    IF ( ISBLANK ( 'Table'[Date Done] ), BLANK (), "week" & c2 )

3.Below are the measure I've created for your needs:

Measure = CALCULATE(COUNT('Table'[Done?]),'Table'[Done?]="Yes")

4.Then, apply the column to the matrix view:

vlinyulumsft_2-1729833811214.png

4.Next, modify the layout in the following position:

vlinyulumsft_3-1729833811216.png

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_4-1729833824686.png

Please find the attached pbix relevant to the case.

 
 

Best Regards,

Leroy Lu

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

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.