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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jie
New Member

Create Matrix chart from table chart

Hi all,

 

I need your help with this problem.

I create a table chart with selected value using selectedvalue function. For example, I have a filter with distincts time zones, when I clic in some of then, the column STimeZone of my table is upload.

 

 Captura de Pantalla 2021-09-15 a la(s) 10.28.20.png

 

My question is, I want to create a matrix table with resumen of How many trainers (count traineeId) by equipment and StimeZone I have?

Plz, I need your help.

1 ACCEPTED SOLUTION

Hi  @jie ,

 

Create a dim table using all the measure values as the column values,such as below:

vkellymsft_0-1632124036441.png

Then create a measure to get what you need:

 

Measure =
SWITCH (
    SELECTEDVALUE ( dim[Stimezone] ),
    "Othertimezone",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', 'Table'[Stimezone] = "Othertimezone" )
        ),
    "Sametimezone",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', 'Table'[Stimezone] = "Sametimezone" )
        )
)

 

I made a simple sample for reference,pls check attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

 

View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @jie ,

 

If you create a matrix with the following setup you will get what you need:

  • Rows:
    • StimeZone
    • Equipment
  • Columns
    • Can be empty or with one of the above columns has you prefer
  • Values
    • TraineeID (aggregation count)

 

That should give expected result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Thank u for your answer Miguel.

The problem is that STimeZone is a measure. So, I can't use this for matrix. 😞

Hi  @jie ,

 

Create a dim table using all the measure values as the column values,such as below:

vkellymsft_0-1632124036441.png

Then create a measure to get what you need:

 

Measure =
SWITCH (
    SELECTEDVALUE ( dim[Stimezone] ),
    "Othertimezone",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', 'Table'[Stimezone] = "Othertimezone" )
        ),
    "Sametimezone",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', 'Table'[Stimezone] = "Sametimezone" )
        )
)

 

I made a simple sample for reference,pls check attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

 

Do you need to show the timezone on the matrix?

 

You can create the matrix has I explained but without the measure. Then place the measure has a card to serve has title or similar.

 

If you can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.