Forum Discussion
Need help with DAX Formula
- 10 months ago
Hi ahmer_malick ,
Thanks for the update and additional details.
Please try the below updated measure, which evaluates the last available Promise Date per Branch Plant and SKU within each month and returns the corresponding Quantity Available value:
Qty Available Last Actual Day In Month = VAR _SelEOM = MAX ( 'Calendar'[EOM] ) VAR _LastDateInMonth = CALCULATE ( MAX ( 'Sheet1'[Promise Date] ), ALLEXCEPT ( 'Sheet1', 'Sheet1'[Branch/ Plant], 'Sheet1'[Parent 2nd Item Number] ), 'Sheet1'[Promise Date] <= _SelEOM, 'Sheet1'[Promise Date] > EOMONTH ( _SelEOM, -1 ) ) RETURN CALCULATE ( SUM ( 'Sheet1'[Quantity Available] ), FILTER ( ALLEXCEPT ( 'Sheet1', 'Sheet1'[Branch/ Plant], 'Sheet1'[Parent 2nd Item Number] ), 'Sheet1'[Promise Date] = _LastDateInMonth ) )Please let us know if it gives the expected output for all SKUs across branches.
Thank you.
Hi ahmer_malick,
Can you please provide sample data in a useable format (not a screenshot)?
How to Get Your Question Answered Quickly - Microsoft Fabric Community
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- ahmer_malick11 months ago
Helper II
- tayloramy11 months ago
Super User
Hi ahmer_malick,
Only users in your org are able to access that fileIf you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- ahmer_malick10 months ago
Helper II
I am attaching another PBIX file J&D.pbix