Forum Discussion
ariana_night
4 years agoFrequent Visitor
Simplifying DAX for POS Data
Hello, I have been asked to revise some current measures that someone created before my time. I have spent the last 4 days researching and rewriting the DAX and nothing works. I have to revise measu...
ariana_night
4 years agoFrequent Visitor
Hi:
The table looks like this (using Month over Month example):
This Month and Last Month POS Units sold in 2 different columns. I thought using DATESBETWEEN or DATESINPERIOD would shorten the DAX but either it does not work or I am not using them correctly. As far as relationships, the 'pos weekly all accounts [week end date]' and 'calendar [week end date]' connected. I hope I answered your question.
- Icey4 years ago
Community Support
Hi ariana_night ,
Please try to create your measures like so:
last mo POS = CALCULATE ( 'POS Weekly All Accounts Sales'[POS Units Sold], DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), - 1, MONTH ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.