Forum Discussion

djbuncle's avatar
djbuncle
Helper I
8 years ago
Solved

Cumulative Sum With Slicing On Another Dim Attribute

Hi. I have an issue whereby I've created a running total measure, however I can't slice it on an attribute from another linked dimension.   Cumulative Deposits Today:= CALCULATE([Deposit Value], F...
  • djbuncle's avatar
    djbuncle
    8 years ago

    For the record, I solved this one.

     

    I presumed the field to include in the ALLEXCEPT function would be the key to the appropriate dimension (Deposits[PlayerId]) for which I wanted to slice on.

     

    Cumulative Deposits Today:= CALCULATE([Deposit Value], FILTER(ALLEXCEPT(Deposits, Deposits[PlayerId]), Deposits[DepositHour]<= MAX(Deposits[DepositHour])), FILTER('Activity Date',[Today]=TRUE()))

     

    However what was required was the actual attribute from the related dimension (Player[Brand]). So the downside to this is that you have to list every attribute you want to be able to slice on.

     

    Cumulative Deposits Today:= CALCULATE([Deposit Value], FILTER(ALLEXCEPT(Deposits, Player[Brand]), Deposits[DepositHour]<= MAX(Deposits[DepositHour])), FILTER('Activity Date',[Today]=TRUE()))