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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TKBI
Frequent Visitor

Custom Matrix Table

Hi,

i am fairily new to Power BI so this is maybe a problem with a very obvious solution.

 

My problem is the following:

I have two Datasets loaded into my modell. One for actual sales data and one for budget sales data. The tables have no relationship and look something like this:

Actual Data:

DateQuantityValue
12-2022     1100
01-2023     4400
02-2023     3250

 

Budget Data:

DateQuantityValue
12-2022     3300
01-2023     2120
02-2023     6500

 

So far i had an excel document that visualized the data like this:

 

 ActualBudgetdifferencedifference %
Quantity811-3-27,2%
Value750920-170-18,5%
avg. Value93,7583,6410,1112%

 

I would really like to recreate the exact visual in Power BI but so far i came up with nothing. I assume this can be done via a custom matrix table and i found https://community.fabric.microsoft.com/t5/Community-Blog/Creating-a-custom-or-hybrid-matrix-in-Power... this guide explaining how to create one. Sadly there are a few differences from my problem to the example in the guide (differences like i dont use an existing dimension for the rows) and i am not experienced enough yet to compensate for that.

 

I would really appreciate any help i could get.

 

Thank you very much!

 

1 REPLY 1
TKBI
Frequent Visitor

So far I created two custom tables, one for the rows and another one for the columns using an idex in both tables.

These tables give me the columns and rows in the Matrix I need, but now the problem is to assign the right value to the right Row-Column pair.

I tried to put the Value-Actual measure into one field of the Matrix with following Dax Code:



Values for Matrix =
VAR calc = IF(
        SELECTEDVALUE(vt_columns[Index]) = 1,
             [Value_Act], 0
             )
Return
calc
 
This worked partly as i got the the measure to appear in the Row-Column pair with Index ID 1,1, but I am unsure how to adjust the code to get the other measures to appear in the field 2,3 for example.


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors