Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
3 years ago
Solved

SUMX wrong Subtotal

Hi all!

I have a simple calculation of #Orders * Price. This data is displayed on a matrix visual with all articles. We receive a Subtotal for each department but it seems to be wrong.

I tried this formula but on Article level it works and for totals not.

Revenue = 
VAR _NumO = COUNTROWS('Orders')
VAR _Price = [Price]
RETURN
SUMX(VALUES('Master'[Article]), _NumO * _Price)

 

 

  • Revenue = 
    
    SUMX(VALUES('Master'[Article]), CALCULATE(COUNTROWS('Orders')) * [Price])

1 Reply

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion
    Revenue = 
    
    SUMX(VALUES('Master'[Article]), CALCULATE(COUNTROWS('Orders')) * [Price])