Forum Discussion
parallelperiod vs previousmonth vs adddate
- 10 years ago
Hi SHDJason,
In DAX, PARALLELPERIOD always returns full periods at the given granularity level instead of the partial periods that DATEADD returns. So please check if the dates in date column are continuous. If the dates in the current context do not form a contiguous interval, the function returns an error.
Reference:
PARALLELPERIOD Function (DAX)Regards,
All 3 should be working. Do you have a Calendar Table though?
EDIT: Use Matt's link to create if you don't have - explains step by step - how to create
http://www.powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/
- SHDJason10 years ago
Advocate II
Yes i do have a calendar table. I tried using that and the date column in the data table. Both worked, but only for parallelperiod.
Is it possible that PowerBI caches the data and then does not always refresh? Sometimes, if I create a formula incorrectly then correct it, the new calculated values do not load. But if I refresh the dataset, they do load. I'm wondering if it is a cache issue.
- v-sihou-msft10 years ago
Microsoft Employee
Hi SHDJason,
In DAX, PARALLELPERIOD always returns full periods at the given granularity level instead of the partial periods that DATEADD returns. So please check if the dates in date column are continuous. If the dates in the current context do not form a contiguous interval, the function returns an error.
Reference:
PARALLELPERIOD Function (DAX)Regards,
- SamiTi8 years agoFrequent Visitor
Hi,
Above measure and functions are all working well as mentioned.
However i cant see the Previousmonth sales BY category/store/product division all i get is "blank".
screenshot
- Sean10 years ago
Community Champion
This is what I get with the Measures - numbered in the order you listed them (top to bottom)
If you don't have a Month field though they'll either total OR
as is the case with the 2nd Measure it will be blank because it doesn't have any reference month
If you change a Measure it should immediately reflect that change - but that doesn't trigger data refresh.