The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi guys,
I want to do a cumulative sum for each category (partner_warehouse_id here) :
Here is what i did for the moment :
Solved! Go to Solution.
Hi @Anonymous
Thanks for reaching out to us.
In column dax code, please try
Nombre d'inscriptions cumulé =
CALCULATE (
SUM ( 'Nombre d''inscriptions 2'[Nombre] ),
FILTER (
ALL ( 'Nombre d''inscriptions 2' ),
'Nombre d''inscriptions 2'[partner_warehouse_id]
= EARLIER ( 'Nombre d''inscriptions 2'[partner_warehouse_id] )
&& 'Nombre d''inscriptions 2'[signup_date]
<= EARLIER ( 'Nombre d''inscriptions 2'[signup_date] )
)
)
Usually, max () is used to get the current row in measure dax code.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Thanks for reaching out to us.
In column dax code, please try
Nombre d'inscriptions cumulé =
CALCULATE (
SUM ( 'Nombre d''inscriptions 2'[Nombre] ),
FILTER (
ALL ( 'Nombre d''inscriptions 2' ),
'Nombre d''inscriptions 2'[partner_warehouse_id]
= EARLIER ( 'Nombre d''inscriptions 2'[partner_warehouse_id] )
&& 'Nombre d''inscriptions 2'[signup_date]
<= EARLIER ( 'Nombre d''inscriptions 2'[signup_date] )
)
)
Usually, max () is used to get the current row in measure dax code.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , try with a small change
Nombre d'inscriptions cumulé = CALCULATE(SUM ( 'Nombre d''inscriptions 2'[Nombre] )
,FILTER(ALL('Nombre d''inscriptions 2'),'Nombre d''inscriptions 2'[partner_warehouse_id] = MAX('Nombre d''inscriptions 2'[partner_warehouse_id])
&&'Nombre d''inscriptions 2'[signup_date]<=MAX('Nombre d''inscriptions 2'[signup_date])))
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
10 | |
7 |