Forum Discussion
Month to Month Flow Calculation
- 5 months ago
hi Transho
The reason you are seeing blanks specifically in April, June, September, and November is due to the exact date-shifting mechanics of the DATEADD function interacting with your "End of Month" snapshots. When DATEADD shifts a date back by one month, it attempts to match the exact day number.- When evaluating May, your date is 5/31/2025. DATEADD attempts to shift this back one month to 4/31/2025. Because April only has 30 days, DATEADD automatically adjusts to the last day of the month, returning 4/30/2025. Since you have data on 4/30/2025, the calculation works perfectly.
- However, when evaluating April, your date is 4/30/2025. DATEADD shifts this back exactly one month to 3/30/2025. Because March does have a 30th day, it does not adjust to the 31st. Since your March data was recorded on 3/31/2025, DAX finds absolutely no data for 3/30/2025, resulting in a blank.
This exact same logic applies to June (evaluating May 30 instead of May 31), September (evaluating Aug 30 instead of Aug 31), and November (evaluating Oct 30 instead of Oct 31).
Can you try one of these DAX to see it works or not?
Flow Bucket - 02 := DIVIDE( [Count Bucket - 02], CALCULATE( [Count Bucket - 01], PARALLELPERIOD('Calendar'[Date], -1, MONTH) ) )or
Flow Bucket - 02 := DIVIDE( [Count Bucket - 02], CALCULATE( [Count Bucket - 01], PREVIOUSMONTH('Calendar'[Date]) ) )If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Hi Transho
I am sorry but I am not able to understand what you are asking
the Excel formula showed does not help as there is no visibility of Excel cells
Please can you explain again in detail and show more pictures
Thanks
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Thanks for your time you spared.
Let me put it in brief:
After i appended the files i created additional variables ([Bucket - 00],[Bucket - 01],[Bucket - 02] ... etc).
then i used those variables to generate measures (Count Bucket - 00,Count Bucket - 01,Count Bucket - 02 .. .etc).
The first table shows the tabulation of those measures distributed by the date variable for each file.
Now i need to use those variables or measures to create another measures named (Flow Bucket - 00,Flow Bucket - 01,Flow Bucket - 02 ...etc).
Let us calculate the "FLow Bucket - 02" for month Nov2025 : = 2,988(which is the "Count Bucket - 02") divided by 8,688 (which is the "Count Bucket - 01" of month Oct25)
The arrows in the below table shows the new measures required ratio formula :
Hope i explained a little more and thanks again,