Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
boxen_solution
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
v-jiascu-msft
Employee
Employee

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
v-jiascu-msft
Employee
Employee

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.

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 

 

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. 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.