Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SErgey-kuznetso
Frequent Visitor

Cumulative value across two filters

Hi everyone!

 

I have a table of clients with profit on them. Using this table, I need to calculate the cumulative effect of profit by cohort and day since registration within the cohort.

 

Now I use this formula to calculate the cumulative effect:

 

 

cumulative = 
VAR _indx='DBClient'[days_since_register]
RETURN
CALCULATE(SUM(DBClient[gross_profit]),
FILTER(DBClient, DBClient[days_since_register]=_indx)
)

 

 

 

but it does not suit me because it is calculated only within the day, without taking into account the cohort.

 

Please tell me how can I calculate the cumulative effect by cohort and day?

 

Thank you in advance!

 

SErgeykuznetso_0-1655974870016.png

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @SErgey-kuznetso 

Modify your formula as below:

 

cumulative =
VAR _indx = 'DBClient'[days_since_register]
VAR _cohort = 'DBClient'[cohort]
RETURN
    CALCULATE (
        SUM ( DBClient[gross_profit] ),
        FILTER (
            DBClient,
            DBClient[days_since_register] = _indx
                && DBClient[cohort] = _cohort
        )
    )

 

Best Regards,
Community Support Team _ Eason

View solution in original post

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @SErgey-kuznetso 

Modify your formula as below:

 

cumulative =
VAR _indx = 'DBClient'[days_since_register]
VAR _cohort = 'DBClient'[cohort]
RETURN
    CALCULATE (
        SUM ( DBClient[gross_profit] ),
        FILTER (
            DBClient,
            DBClient[days_since_register] = _indx
                && DBClient[cohort] = _cohort
        )
    )

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors