Forum Discussion
PBIBeginner2022
4 years agoHelper III
DAX : Sum previous month automatically
Hello, I would like to translate this into DAX language: I have a column calculated with the value of each item sold and a column with the date of sale of each item. I would like to create a...
- Anonymous4 years ago
Hi PBIBeginner2022 ,
This formula should work.
Pre_sales = CALCULATE ( SUM ( 'Table'[Price] ), FILTER ( ALLSELECTED ( 'Table' ), FORMAT ( 'Table'[Date], "YYYYMM" ) = FORMAT ( EDATE ( TODAY (), -1 ), "YYYYMM" ) ) )Best Regards,
Jay
bettyfish
1 year agoNew Member
when i try this the very first month, instead of being blank, includes the total of all rows
beg bal BS = var result = calculate([FTP-TTD],PREVIOUSMONTH('tbl_Calendar'[Date]))
would you have any idea what i can be doing wrong??
thanks!
betty
Ashish_Mathur
1 year agoSuper User
Hi,
Share the download link of the PBI file and show the problem there very clearly.