Forum Discussion

Cosik's avatar
Cosik
Icon for Helper I rankHelper I
6 years ago
Solved

Create Cumulative line from measure

Hi,

 

I'm strugling to create cumulative line. I know how to do in theory but I'm stuck on one of the steps. I can't use measure in calculation and I don't know how to convert this.

 

This is what I have:

 

I have create 3 measure:

Dane_1CALCULATE (COUNTROWS (Tracker),FILTER (Tracker,Tracker[PIF Status]="COMPLETED"&& Tracker[Type]="other"))

Dane_2CALCULATE (COUNTROWS (Tracker),FILTER (Tracker,Tracker[PIF Status]="IN PROGRESS"&& Tracker[Type]="other"&& Tracker[Group from MDS]<>"5"&&Tracker[Group from MDS]<>"4"))

Dane_suma - Dane_1 + Dane_2

 

The 3rd I want to use to create cumulative line.

 

I try to use such code but i can't use measue inside calculation ๐Ÿ˜

Skumulowany =
CALCULATE (
SUM(Tracker[Dane_suma]),
FILTER(
ALLSELECTED(Tracker),
Tracker[RFS week]<=Tracker[RFS week]))
 
Below you can see printscreen, the one on the top is final result, the rest are just for testing. I also try to create new column with   Dane_1 calculation but it gives me strange numbers (on the bottom left table).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
I will be very gratefull for any kind of tips which will help me deal with it.
  • Maybe this? :

    Skumulowany =
    SUMX (
        FILTER ( ALLSELECTED ( Tracker ), Tracker[RFS week] <= max(Tracker[RFS week]) ),
        [Dane_suma]
    )



    _______________
    If I helped, please accept the solution and give kudos! ๐Ÿ˜€

     

8 Replies