Forum Discussion
atrpbiuser
5 years agoFrequent Visitor
Financial Calculations
Hi - Trying to replicate a Tableau report to PBI and need some direction. We have a Sales_Date column inside the main SQL query through which we are trying to pull sales for different periods , how...
- 5 years ago
Following worked out.
Sales_Full_Month_LY = CALCULATE(SUM(sheet[INVOICE_SALES]),DATESMTD(ENDOFMONTH(DATEADD(Calender_Dates[Inv_Dates],-12,MONTH))))
atrpbiuser
5 years agoFrequent Visitor
Thank you very much amitchandak -
Will last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date])) return full month's sale from last year ?
For example - today is 8/30/21 and still has one day to close the month , what we are looking to display is last year August's full month sales from 8/1/2020-8/31/2020 alongside the current MTD (8/1/2021-8/30/2021) sales .
Thank you very much for your assistance.
atrpbiuser
5 years agoFrequent Visitor
Following worked out.
Sales_Full_Month_LY = CALCULATE(SUM(sheet[INVOICE_SALES]),DATESMTD(ENDOFMONTH(DATEADD(Calender_Dates[Inv_Dates],-12,MONTH))))