Forum Discussion

kusanagi's avatar
kusanagi
Frequent Visitor
2 years ago
Solved

Show total without filter

Refer to the screenshot below, I woulk like to remove "misc" from the table, but still show the actual total quantity.

Please let me know if this is possible.

 

This is what I have in Power BI

And this is what I wish it could shows.

 

I don't know how to attach file, so I paste my measures here

Total Qty = SUM('Table'[Qty])
Remove misc = CALCULATE(SUM('Table'[Qty]),'Table'[Product]<>"Misc")
% = DIVIDE([Remove misc],CALCULATE([Total Qty],ALL('Table'[Lot])))
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi kusanagi ,

    I have created a simple sample, please refer to it to see if it helps you.

    Create a measure.

    RESULT = 
    VAR _A =
        SUMX ( ALL ( 'Table' ), 'Table'[total qty] )
    VAR _C =
        SUMX ( ALL ( 'Table' ), 'Table'[remove misc] )
    VAR _b =
        SUMMARIZE ( 'Table', 'Table'[lot], "aaa", _A )
    RETURN
        IF (
            HASONEVALUE ( 'Table'[lot] ),
            MAX ( 'Table'[total qty] ) / ( SUMX ( ALL ( 'Table' ), 'Table'[total qty] ) ),
            DIVIDE ( _C, _A )
        )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

     

     

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi kusanagi ,

    I have created a simple sample, please refer to it to see if it helps you.

    Create a measure.

    RESULT = 
    VAR _A =
        SUMX ( ALL ( 'Table' ), 'Table'[total qty] )
    VAR _C =
        SUMX ( ALL ( 'Table' ), 'Table'[remove misc] )
    VAR _b =
        SUMMARIZE ( 'Table', 'Table'[lot], "aaa", _A )
    RETURN
        IF (
            HASONEVALUE ( 'Table'[lot] ),
            MAX ( 'Table'[total qty] ) / ( SUMX ( ALL ( 'Table' ), 'Table'[total qty] ) ),
            DIVIDE ( _C, _A )
        )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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