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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
conniedevina
Helper I
Helper I

Custom Matrix Table Power BI based on measures

Hi All,

I'm having little bit problem, so I want to create custom matrix table for KPI and hoping it would look like this 

conniedevina_0-1637142838918.png

So for Budget I have this measure to calling each measures

Budget = var a = SELECTEDVALUE('KPI Report'[ID])
return
SWITCH(TRUE(),
a=11,[Business_day BUD Lunch],
a=12,[Business_day BUD Cafe],
a=13,[Business_day BUD Dinner],
a=21,'Measure List'[Total_Budget Amount Lunch],
a=22, 'Measure List'[Total_Budget Amount Cafe],
a=23, 'Measure List'[Total_Budget Amount Dinner])

 

and below for actual

Actual = var a = SELECTEDVALUE('KPI Report'[ID])
return
SWITCH(TRUE(),
a=11,[Business_day BUD Lunch],
a=12,[Business_day BUD Cafe],
a=13,[Business_day BUD Dinner],
a=21,[Total_Actual Amount Lunch],
a=22, [Total_Actual Amount Cafe],
a=23, [Total_Actual Amount Dinner])

So it will have measure for each line of the rows because actually for the KPI I created custom table to make the matrix table like that.

and here is the KPI table that I've created

conniedevina_1-1637143136126.png

 

The problem is I'm not sure why the total is blank like below

conniedevina_2-1637143166257.png

 

Is it because I'm using Switch as my final measure so it won't sum the total?

I attach the pbix file here with the sample data.

Any help will be very appreciated! Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @conniedevina ,

I updated your sample pbix file(see attachment), please check whether that is what you want. You can create another new two measures as below and put them on the matrix to replact the original measures [Budget] and [Actual]:

nBudget = 
SUMX (
    GROUPBY ( 'KPI Report', 'KPI Report'[KPI], 'KPI Report'[Shift Order] ),
    [Budget]
)
nActual = 
SUMX (
    GROUPBY ( 'KPI Report', 'KPI Report'[KPI], 'KPI Report'[Shift Order] ),
    [Actual]
)

yingyinr_0-1637548821359.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @conniedevina ,

I updated your sample pbix file(see attachment), please check whether that is what you want. You can create another new two measures as below and put them on the matrix to replact the original measures [Budget] and [Actual]:

nBudget = 
SUMX (
    GROUPBY ( 'KPI Report', 'KPI Report'[KPI], 'KPI Report'[Shift Order] ),
    [Budget]
)
nActual = 
SUMX (
    GROUPBY ( 'KPI Report', 'KPI Report'[KPI], 'KPI Report'[Shift Order] ),
    [Actual]
)

yingyinr_0-1637548821359.png

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.