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
Hi folks,
I have a table of unregular day cash in and outflows for a few years. How do I create a measure for waterfall chart that begins with previous month balance, then showing increases/decreases for every day of the filtered month, ending with the balance at the end of the filtered month? My table looks like this:
Date CashFlow
------- -----------
2016-Jan-1 100
2016-Jan-2 -40
2016-Mar-3 -20
2017-Feb-20 200
2017-Feb-25 120
2017-Feb-26 -30
If current filtered month is 2017-Feb, the waterfall chart I would expect to chart:
40 200 120 -30 330
where 40 is the sum of all cash flows prior to 2017-Feb-1.
Solved! Go to Solution.
@gvg,
I've modified the .pbix. Please check again.
@gvg,
You may refer to the following DAX.
Measure = IF ( MAX ( Table1[Date] ) = CALCULATE ( MIN ( Table1[Date] ), ALLSELECTED ( Table1 ) ), CALCULATE ( SUM ( Table1[CashFlow] ), FILTER ( ALL ( Table1[Date] ), Table1[Date] <= MAX ( Table1[Date] ) ) ), SUM ( Table1[CashFlow] ) )
Well, this returns just one value 330 instead of all five. Nothing to chart. But thanks for the tip.
@gvg,
Please check the .pbix attached.
Thanks @v-chuncz-msft.
This is very close to what I am looking for. The only thing is that I want to be able to select month and have cash flows charted step by step during that month with the beginning of month and end of month values. However, when I select month ( I made my own Calendar that includes months), it doesn't chart the initial beginning balance.
@gvg,
I've modified the .pbix. Please check again.
Hi again,
It looks like this measure works only if there is no relationship between Date fields. How to modify the measure so that it works when Table1 and Calendar fields are related through the Date field?
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 |
---|---|
119 | |
88 | |
74 | |
67 | |
49 |
User | Count |
---|---|
199 | |
141 | |
97 | |
79 | |
68 |