cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Date slicer and parallelperiod - first month gets corrupted.

I am using some measures based on the PARALLELLPERIOD function to compare the figures for current month with last month.  (Data is members statistics monthly collected). 

 

I would like to use the "Slicer" control in a report and let the users select a year and then get a list of all month that year and the monthly changes. This works fine for all months except january. I guess this is due to that the data for december (previous year) is not in the selection. 

 

Strange thing is that it works fine if the user selects specific dates in the slider (eg. 2016-01-01 --- 2016-12-31)

 

Does anybody have a workaround or solution for this behaviour?

 

Best Regards

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Date slicer and parallelperiod - first month gets corrupted.

Hi @boxen_solution,

 

I can’t reproduce your scenario. Please post more details. A snapshot will be great.

In this situation, it works fine.

 

Current =
SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] )

 

LastMonth =
CALCULATE (
    SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] ),
    PARALLELPERIOD ( 'Date'[Date], -1, MONTH )
)

Date slicer and parallelperiod - first month gets corrupted.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Microsoft
Microsoft

Re: Date slicer and parallelperiod - first month gets corrupted.

Hi @boxen_solution,

 

I can’t reproduce your scenario. Please post more details. A snapshot will be great.

In this situation, it works fine.

 

Current =
SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] )

 

LastMonth =
CALCULATE (
    SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] ),
    PARALLELPERIOD ( 'Date'[Date], -1, MONTH )
)

Date slicer and parallelperiod - first month gets corrupted.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Regular Visitor

Re: Date slicer and parallelperiod - first month gets corrupted.

Hi and thanks for your reply. I'll try to explain with two screenshots. 

 

Here i use the slicer with the period selection based on a from and to date. Now it works. 

If you look at the first row and the third column (Förändring antal aktiva medlemmar(), it displays  -43274. This is showing the change in active members since the december figures for 2015. 

works.PNG

 

If i use the same column as refiner, but a different visual appearance of the selector (showing full years). It does not work.

Now the expected change in January is not displaying the change from december, but the total number of active members. 

See that column three is sam as column 2 for january. The other months are displaying correctly. 

doesnt work.PNG 

 

Highlighted
Regular Visitor

Re: Date slicer and parallelperiod - first month gets corrupted.

Hi again Dale.

Together with you suggestions in the other thread where you helped me, i got this working. I think the key was to add an extra date-table with all running dates. 

Highlighted
Microsoft
Microsoft

Re: Date slicer and parallelperiod - first month gets corrupted.

Hi @boxen_solution

 

I am so glad your problem is solved. Thank you for sharing it with us. I used a "DATE" table indeed. I think it's a good practice to use a "DATE" table when using time intelligence functions.

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors