Error in last 3 months calculation in PowerBi
calculating the last 3months or average was working in one PBIX file. Now when I try to use it in another it comes up empty. Naming seems to be right and the Calendar is a copy from the working PBIX.
What can have gone wrong between the two files, is there something obvious you can see?
Is there something I should check and possibly change?
SLS L3m (USD) =
var months = 3 var sum_period = CALCULATE( [Sales (USD)], DATESINPERIOD('Calendar'[Date] , FIRSTDATE('Calendar'[Date])+1 , -months, MONTH ) ) return IF( NOT(ISBLANK([Sales (USD)])), sum_period)
INV avg L12m (USD) =
var months = 12 var sum_period = CALCULATE( [Inventory (USD)], DATESINPERIOD('Calendar'[Date] , LASTDATE('Calendar'[Date]) , -months, MONTH ) ) return IF( NOT( ISBLANK( [Inventory (USD)] )), sum_period/months )
Comments
Post a Comment