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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Subtotal in a visual table returning zero on a measure column

Hi,

I have created a visual table and I would like to get the total sum from a column that I inserted as a measure,

The table keeps returning me 0, but it is expected to make a sum of each row from this visual table,

RodCamargoJr_3-1692819817546.png

I can get my result by exporting this to excel this table and then making the sum manually, but I would like to get this result automatically, this result could be a simple measure to insert in a visual card, for example,

RodCamargoJr_2-1692818952397.png

(This number is just an example, I couldn't get the right formula to it, and that's where I need help)


I need help to write a measure to get this result and insert in a visual card, I know that is impossible to get my expected result in the visual table column subtotal,

Let me explain the composition of this data here by using examples:

(This is a fixed key table)

Table1
CodeID
800717
800275
800284
800277
800288
800283
800909
800272
800473


(This is a dimension table, it might have some IDs from Table1)

Table2
CodeID Value
800717  224,2
800275  281,1
800284  351,3
800277  204,1


(This is a dimension table, it might have some IDs from Table1)

Table3
CodeID Value
800717287,1
800275297,2
800288223,2
800283245,3
800909256,7
800272257,5
800473210,2
AVERAGE253,9


(Then I create this visual table, by using the Table1 as structure, and values from table 2 and 3, plus the measures)

=Data from Table1  =IF( ISBLANK([ValuesTable3]), ValuesTable2, ValuesTable3)=[Measure1] - CALCULATE( AVERAGE(Value'Table3'), ALLSELECTED('Table3')) = [FixedValue] * [Measure2]
CodeID ValuesTable2 ValuesTable3Measure1Measure2FixedValueMeasure3
800717 224,2 287,1287,133,214285712469,282012,71
800275 281,1 297,2297,243,314285714697,2203455,86
800284 351,3 351,397,414285713001,1292350,01
800277 204,1 204,1-49,785714292002,4-99690,91
800288 223,2223,2-30,685714296447,2-197836,94
800283 245,3245,3-8,585714286946,9-8129,81
800909 256,7256,72,814285714876,32466,16
800272 257,5257,53,6142857141621,75861,29
800473 210,2210,2-43,68571429784,6-34275,81
SUBTOTAL 253,89253,89022846,60 (Expected result here should be 246212,56)


Thank you for your support, community,

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous,

It seems like a common issue when measure expression calculate with multiple level aggregations, you can take a look the following blog to know more about this and how to handle it:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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