March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello everyone 🙂
I have a Table called 'ESSAIS' with various columns.
One of them is the quantity month by month. I have a column for cumulative quantity.
I did like this to have my cumulative column :
Cumule = CALCULATE(SUM(ESSAIS[QtyMonth]);ALL(ESSAIS);ESSAIS[Date]<=EARLIER(ESSAIS[Date]))
I've data on four years, and I'd like to reset my cumulative column on each january...
Is it possible on Power BI ? I haven't found it on the web... Really disturbing !
I tried, with a new column, to test the month. And the month of January, put 0 in the cumulative Column. It's okay, but doesn't reset the SUM... And the month on February is added to the precedent sum...
Thank you very much for your help !
Solved! Go to Solution.
Found what I wanted !
If it can help any of you, the formula :
ECC REMISZERO = VAR myDate = ESSAIS[Date]
RETURN
CALCULATE(
SUM(ESSAIS[QtyMois]);
FILTER(
ESSAIS;
ESSAIS[Date]<=myDate
&& YEAR(ESSAIS[Date])=YEAR(myDate)))
It resets the sum every January ! 😄
Found what I wanted !
If it can help any of you, the formula :
ECC REMISZERO = VAR myDate = ESSAIS[Date]
RETURN
CALCULATE(
SUM(ESSAIS[QtyMois]);
FILTER(
ESSAIS;
ESSAIS[Date]<=myDate
&& YEAR(ESSAIS[Date])=YEAR(myDate)))
It resets the sum every January ! 😄
Hi @Tiff,
You may need this formula:
Cumule = CALCULATE ( SUM ( ESSAIS[QtyMonth] ); FILTER ( ALLEXCEPT ( ESSAIS; ESSAIS[Date].YEAR ); ESSAIS[Date] <= EARLIER ( ESSAIS[Date] ) ) )
Best regards,
Yuliana Gu
Hi Yuliana,
Thank you for your answer !
However, it doesn't reset every January... It is a cumulative sum... On my whole data.
Do you know how to reset this SUM every January ? (I have data every day between the first of January 2018 and the first of January 2021.
I would like my SUM to be at zero every month of January....
I admit I'm totally lost on this one... 😮
Thanks for your help !
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |