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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Beniya_Sam_14
Frequent Visitor

Measure Not Showing Total

Hi All,

I am having trouble showing total using Measure.

Table 1 = SUMMARIZE('Tablename','Tablename[ITEM_CODE],"Sale qty",MAX('Tablename'[Sales Qty]),"Sales Value",MAX('Tablename'[Sales Value]'),"Stock qty",SUM('Tablename'[STOCK_QTY]),"Stk value",SUM('Tablename'[TOTAL_STOCK]))

 

Measure 1 = if(SUM('Tablename'[STOCK_QTY])>=SUM('Tablename'[Sales Qty]),blank(), SUM('Tablename'[Sales Qty])-SUM('Tablename'[STOCK_QTY]))

 

When am trying to put that Measure in Matrix , it is not Showing Total. 

The Below Screenshot shared has no total for first two measure

Yet to Proc.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Beniya_Sam_14 ,

 

I suggest you to try code as below.

Measure 1 =
VAR _VIRTUALTABLE =
    SUMMARIZE (
        'TableName',
        'TableName'[Section],
        "Measure 1",
            IF (
                SUM ( 'Tablename'[STOCK_QTY] ) >= SUM ( 'Tablename'[Sales Qty] ),
                BLANK (),
                SUM ( 'Tablename'[Sales Qty] ) - SUM ( 'Tablename'[STOCK_QTY] )
            )
    )
RETURN
    SUMX ( _VIRTUALTABLE, [Measure 1] )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Beniya_Sam_14 ,

 

I suggest you to try code as below.

Measure 1 =
VAR _VIRTUALTABLE =
    SUMMARIZE (
        'TableName',
        'TableName'[Section],
        "Measure 1",
            IF (
                SUM ( 'Tablename'[STOCK_QTY] ) >= SUM ( 'Tablename'[Sales Qty] ),
                BLANK (),
                SUM ( 'Tablename'[Sales Qty] ) - SUM ( 'Tablename'[STOCK_QTY] )
            )
    )
RETURN
    SUMX ( _VIRTUALTABLE, [Measure 1] )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous ,

Thank you for your reply. That Works fine. But if I change the dimension From Section to another Dimension, it shows different value.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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