Forum Discussion

BIUser1998's avatar
BIUser1998
Helper I
2 years ago
Solved

Subheaders from two tables in PowerBI Matrix Table

I have two data tables Category Class Value Fiscal Year America A 35 2022 Canada A 49 2022 France A 12 2022 China A 324 2022 America B 75 2022 Canada B 12 2...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  BIUser1998 ,

    I’d like to acknowledge the valuable input provided by the  amitchandak . His initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue.  In my investigation, I took the following steps:  

    I create two tables as you mentioned.

    Then I go to the Power Query and use the Appended Queries.

    Then I create two measures named A and B.

    A = MAXX(FILTER('T1','T1'[Class]="A"),'T1'[Value])
    B = MAXX(FILTER('T1','T1'[Class]="B"),'T1'[Value])

    Finally I use the matrix visual and get what you want.

     

     

     

    Best Regards

    Yilong Zhou

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

  • BIUser1998's avatar
    BIUser1998
    2 years ago

    Hi Anonymous, this worked like a charm. I have an additional doubt though. Since there are two tables, there are some rows common and some distinct rows, is there any way I can show in which all tables which country is available? Something like shown in the screenshot attached?