Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a dataframe where each row corresponds to a customer joining or churning. The Balance (in german "Saldo") column showing either +1 or -1 corresponding to a customer joining or churning. I plot the sum of each as a line chart against the date. It looks like:
The grey line gives the cumulative sum over all days. You can already see it in the plot, there is a dip in September. If I look in the underlying data everything works as expected till the 4th of September:
Column 1 and 3 are churners on that day and 2 and 4 are joiners. The last column gives the sum. On the 4th of September then the dip comes:
You can see the 81 there. WHAT? Why the hell is there an 81? There should be 2107 as in all other rows. Hmm.
Can someone help me?
Solved! Go to Solution.
Hi @LSE95 ,
I see,thanks for your notification,btw,is your issue solved now?
If so,could you pls mark the reply as answered to close it?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
The formula is:
Cumulative Balance =
CALCULATE(
SUM('Table'[Balance]),
FILTER(
ALLSELECTED('Table'[Date]),
ISONORAFTER('Table'[Date], MAX('Table'[Date]), DESC)
)
)
Where the column Balance contains the -1 and 1s.
Hi @LSE95 ,
As tested here,the function works fine.
Could you pls try below formula instead?
Cumulative Balance =
CALCULATE(
SUM('Table'[Balance]),
FILTER(
ALLSELECTED('Table'[Date]),
'Table'[Date]<=MAX('Table'[Date]))
)
If it still doesnt work,could you pls upload your .pbix file for test?Remember to remove the confidential information.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @v-kelly-msft ,
it didn't solve my problem, but I know now what it was. In the Date column there can be NULL values sometimes if the employees in the Back Office don't write a receipt. If Date is null, but Balance is 1 or -1 this leads to problems. You have to be careful when there are Nulls.
Best regards,
Armin
Hi @LSE95 ,
I see,thanks for your notification,btw,is your issue solved now?
If so,could you pls mark the reply as answered to close it?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@LSE95 What is the formula you are using?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 31 | |
| 27 | |
| 24 |