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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
FabiNeed
Helper I
Helper I

PowerBI Creating a matrix with text values

I am facing a difficult challenge this time. I got two table from which I want to construct a matrix.

Table 1 (called "Entity") contains a parent-child hierachy and looks like this:

 

P1.png

 

Table 2 (called "Values") has already been unpivoted and contains values for one entity:

P2.png

The key both tables have in common is the column "EntityKey".

The aim is to create a matrix. "level1", "level2" and "level3" from table 1 should be placed in the rows, "attribute" from table 2 in the columns and "values" from table 2 should be taken as values. The result should look like this:

P3.png

When displayed in PowerBI, the result looks like this at the moment (see arrows for the problems):

Picture67png.png

 I uploaded a PowerBI file, where you can see the current status: PowerBI file

As you can see, there are multiple problems, which I am not able to fix:

  • There should be no empty rows
  • For each level of aggregation, a value should be visible even if it is fully expanded. This value can be different than the levels at a lower level. E.g.: Value for D2: "middle", while the value for I2 within D2 "high"

Any ideas, how I can achieve this? Happy for any advice!

4 REPLIES 4
NickolajJessen
Solution Sage
Solution Sage

If you add Table format of your data in stead of screen shots it's easier to copy paste into Power Bi and find a soloution for you 🙂 

MrSujay
Resolver II
Resolver II

HI @FabiNeed 

Could you please add the exact expected output? I am getting below output is correct?

MrSujay_0-1654070842913.png

 

Hi @MrSujay 

thanks for your solution. The only thing which is missing is the hirachy which allows to expand or extent items. The expected output should look like this:

 

Picture7.png

@FabiNeed  Please upload both source file too if possible

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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