Forum Discussion

PuzzledSpark's avatar
PuzzledSpark
Frequent Visitor
8 years ago

Why does this result in a cumulative amount?

Redirecting this to my other post:

https://community.powerbi.com/t5/Desktop/Subtotal-not-correct/m-p/331048/highlight/false#M147991

 

 

------------------

 

My data is in YTD format. So I created a measure called [AmountQTD] that subtracts the previus quarter to give the QTD

 

Now if I do this:

GrossProfit_QTD = CALCULATE([AmountQTD])

 

I get the same QTD number back, as expcted.

 

If I do this:

GrossProfit_QTD = CALCULATE([AmountQTD],filter('P&L',[accountLevel4]="Total Gross Profit"))

 

I get a cumulative amount being returned. Why is this? Note all fields referenced here belong to the same 'P&L table.

2 Replies

  • Can’t give an answer without more information. Tables?  Model design? Measure formulas?  Separate calendar table?

     

    or post sample file.  

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI PuzzledSpark,

     

    Which relationships you used to link these tables? Single or both? If single, I'd like to suggest you modify the cross filter direction option to both and try again. (when you use single option, the filter effect only works on one side)

     

    In addition, I think you can add more group/category column to help measure calculated on all row contents.

     

    Regards,

    Xiaoxin Sheng