Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi I have problem using the actual SOH total as the start point of month Nov onward for forecast purpose.
My aim is to use DAX to have all futuer months (Nov onward) show as 71 Qty on hand which is carried forward from last month actual.
If anyone would help find a solution please? below rawdata sample only. Actual database is very big accross months of past two years showing EOM stock level by item.
Solved! Go to Solution.
The answer should be 62 for all months from October onwards. Revise the QoH measure to:
QoH = if(MAX('Calendar'[Date])>=EOMONTH(today(),-1)+1,CALCULATE([Q],CALCULATETABLE(LASTNONBLANK('Calendar'[Date],CALCULATE([Q])),DATESBETWEEN('Calendar'[Date],MINX(ALL('Calendar'),'Calendar'[Date]),EOMONTH(today(),-1)))),[Q])
Hope this helps.
Thanks for your prompt reply.
I tried and had issue with m2
m2 = CALCULATE(MAX('Table'[FullMonth]), FILTER(ALL('Table'),'Table'[Qtr on Hand]>0))
I alternatively used the below and does not work either.
I have udpated as per below.
I can't access it, can you share the file?
Resending the below.
Not much difference to the orignal link.
in case you still could not open the link, below rawdata
Item Qty on hand FullMONTH MonthNo
1 | 2 | 1/07/2023 | 1 | |
2 | 58 | 1/07/2023 | 1 | |
3 | 2 | 1/07/2023 | 1 | |
1 | 3 | 1/08/2023 | 2 | |
2 | 59 | 1/08/2023 | 2 | |
3 | 3 | 1/08/2023 | 2 | |
1 | 4 | 1/09/2023 | 3 | |
2 | 60 | 1/09/2023 | 3 | |
3 | 4 | 1/09/2023 | 3 | |
1 | 5 | 1/10/2023 | 4 | |
2 | 61 | 1/10/2023 | 4 | |
3 | 5 | 1/10/2023 | 4 | |
1 | 6 | 1/11/2023 | 4 | |
2 | 62 | 1/11/2023 | 4 | |
3 | 6 | 1/11/2023 | 4 | |
1 | 0 | 1/12/2023 | 6 | dummy row |
1 | 0 | 1/01/2024 | 7 | dummy row |
1 | 0 | 1/02/2024 | 8 | dummy row |
1 | 0 | 1/03/2024 | 9 | dummy row |
1 | 0 | 1/04/2024 | 10 | dummy row |
1 | 0 | 1/05/2024 | 11 | dummy row |
1 | 0 | 1/06/2024 | 12 | dummy row |
Hi,
Why are there 0's in the Quantity column for months from Dec onwards? Shouldn't those be blanks?
hi Ashish, please refer to this file.
I mannaully created Dec onward lines and you could delete it if you do not need them.
Actual quantity aginast fullmonth 01/11/2023 should be the stock level for Oct end of month since these stock valuation reports are ran in the very early hours of the 1st of a new month.
hi Ashish, thanks for your reply. Seems I could not send a downloadable pbix file.
Oct is supposed to be latest finalised month which has full month 01/11/2023 against it in the table so latest actual QoH shoud be 65 for Oct and then the same much for future forecast periods. (nb. I had to reference it this way to serve other purposes).
Below my updated rawdata to replicate my real database.
Item Qty on hand WHS FullMONTH MonthNo
1 | 2 | A | 1/07/2023 | 1 |
1 | 1 | B | 1/07/2023 | 1 |
2 | 58 | A | 1/07/2023 | 1 |
3 | 2 | A | 1/07/2023 | 1 |
1 | 3 | A | 1/08/2023 | 2 |
2 | 59 | A | 1/08/2023 | 2 |
3 | 3 | A | 1/08/2023 | 2 |
4 | 0 | A | 1/08/2023 | 2 |
1 | 4 | A | 1/09/2023 | 3 |
2 | 0 | A | 1/09/2023 | 3 |
2 | 60 | B | 1/09/2023 | 3 |
3 | 0 | A | 1/09/2023 | 3 |
1 | 0 | A | 1/10/2023 | 4 |
2 | 61 | A | 1/10/2023 | 4 |
3 | 1 | A | 1/10/2023 | 4 |
1 | 1 | A | 1/11/2023 | 4 |
2 | 62 | A | 1/11/2023 | 4 |
3 | 2 | A | 1/11/2023 | 4 |
The answer should be 62 for all months from October onwards. Revise the QoH measure to:
QoH = if(MAX('Calendar'[Date])>=EOMONTH(today(),-1)+1,CALCULATE([Q],CALCULATETABLE(LASTNONBLANK('Calendar'[Date],CALCULATE([Q])),DATESBETWEEN('Calendar'[Date],MINX(ALL('Calendar'),'Calendar'[Date]),EOMONTH(today(),-1)))),[Q])
Hope this helps.
Appreciate your help!
You are welcome.
I can’t help without the file, I don’t know what’s in your matrix
Please note that I have the beginning of each month, and you should have it too
hi I have just recreated the file as per below for your help.
Oct is supposed to be latest finalised month which has full month 01/11/2023 against it. (nb. I had to reference it this way to serve other purposes.
let me know if you could open this link.
as you see m2 and final are not shows as expected.
Thanks in advance.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
195 | |
80 | |
70 | |
51 | |
42 |