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
deepalsoft
Regular Visitor

Matrix Subtotal Issue

I have created a matrix visualization using a table. I want to change subtotal value as below image. Also need to add separate line as additional hours and it is a calculation (Total Actual Time hours - 8).  Appriciate if anyone can help me to solve this.

 

 

Matrix - 

deepalsoft_2-1679377686812.png

 Source - 

deepalsoft_3-1679377707250.png

 

 

 

1 ACCEPTED SOLUTION
Thennarasu_R
Responsive Resident
Responsive Resident

Hi @deepalsoft 

For this case Source no matter.Some It happen in Matrix Visual.

Try This formula Template.
First You Neeed to Create one Measure.
Measure 1=Calculate(Sum(Sales))
You Should Measure 2 paa into the Visuals.

Measure 2=IF (
HASONEFILTER ( Column Name ),Measure 1,Sumx(Values(Column Name),Measure 1))

If i have answered your Qus Kindly Give Kudos and Accepeted a Solution.


Thanks,
Thennarasu

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Use hasonevalue function there.

@Anonymous 

I thought Hashone is not correct one . Why I'm Saying This one HashoneValue function accepted Cross Filter .

Hashone filter Ignore Cross Filter That a Reason for this scenarios I choose the Hashonefilter. 

If i have answered your Qus Kindly Give Kudos and Accepeted a Solution.


Thanks ,
Thennarasu

Thennarasu_R
Responsive Resident
Responsive Resident

Hi @deepalsoft 

For this case Source no matter.Some It happen in Matrix Visual.

Try This formula Template.
First You Neeed to Create one Measure.
Measure 1=Calculate(Sum(Sales))
You Should Measure 2 paa into the Visuals.

Measure 2=IF (
HASONEFILTER ( Column Name ),Measure 1,Sumx(Values(Column Name),Measure 1))

If i have answered your Qus Kindly Give Kudos and Accepeted a Solution.


Thanks,
Thennarasu

Same result. anythis is wrong?

Measure 2

deepalsoft_0-1679395465120.png

 

Measure 1

 

deepalsoft_1-1679395505813.png

 

@deepalsoft 
Yes you Did some mistake 

Thennarasu_R_0-1679396132441.png

I marked in this image there you Should Use Employee Id Columns or Other Columns .Don't use the Actual Time Cost Column Both Place .

If i have answered your Qus Kindly Give Kudos and Accepeted a Solution.

Thanks,
Thennarasu

I have change as you said. but i need subtotal as

Eg - 12 x 360 = 4320

 

deepalsoft_0-1679400527438.png

 

@deepalsoft 
Try this one .
Your Requirements Multiple two Column So You should put One more Measure.
Measure 2=IF (
HASONEFILTER ( Column Name ),Measure 1,Sumx(Values(Column Name),Measure 1 *Actual Time Hours Measure))

If i have answered your Qus Kindly Give Kudos and Accepeted a Solution.


Thanks,
Thennarasu

Still I have a same output. But I will try your DAX in different ways.

@deepalsoft 
Yes you Did some mistake 

Thennarasu_R_0-1679396132441.png

I marked in this image there you Should Use Employee Id Columns or Other Columns .Don't use the Actual Time Cost Column Both Place .

If i have answered your Qus Kindly Give Kudos and Accepeted a Solution.

Thanks,
Thennarasu

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.