Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have two tables: one with forecast and one with stock, related by a date table.
I try to create a measure, to be used in a matrix graph (year and month on culumns and article on rows), that will calculate every month Stock-Forecast and cumulate the result in the following months only if the result from the prev. month is negative. If is positive, the next month will start again to cumulate those moths that are negative.
Here is what I have so far:
But this measure is not resetting when a positive result in the prev. month
This is the expected outcome:
Hi @Anonymous ,
Dax is not available. And Dax can't do iterations. You can achieve it in Power Query.
I have found a similar post, please refer to if to see if it helps you.
Power Query - Cumulated row, if a certain value is matched
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |