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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Duplicates in slicer by month please help!

Hello,

I have a appened table based on yearly data pulled from SAP. (2020 \ 2021).

I have created a Date table which added a date hierarchy too.

in the slicer I can add Month from both the date hierarchy or "More fields".

Problem is that if i add the slicer from the date hierarchy - it shows duplicate values (i.e, January, January, Febuary, Febuary...)

and if i add the slicer from the "More fields" the "SamePeriodLastYear" function doesnot work.

Please Help 🙂

 

Adam_D_0-1622362185203.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found that the duplicate values in the month slicer and the error in the sameperiodlastyear function occur when in the pivot table there are both years added, so as a workaround i seperated the years into two pivot tables.

Thanks all for the assist!

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

I found that the duplicate values in the month slicer and the error in the sameperiodlastyear function occur when in the pivot table there are both years added, so as a workaround i seperated the years into two pivot tables.

Thanks all for the assist!

PaulDBrown
Community Champion
Community Champion

Did you create a relationship between the date table and your fact table?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Yes i did. 

 

Adam_D_0-1622397575515.png

 

Are both the date fields set as date types? (You mentioned you created the date field by: "The yearly data is actualy pulled in a yearmonth format (i.e. 202001) and in the appened query i transformed it to date by adding 01 (Yearmonth & "01"). "

Both date fields must be date types: ie 01/01/2021 and not 20210101





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

yes they are, after adding the "01" i changed the column to date. 

the function "sameperiodlastyear" works, but not when i add the month slicer... then i get the error. 

Just to check, can you provide a screenshot of the date columns?
datetable.JPG

 

Also, why are you creating slicers from two different "Month" fields?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






daxer-almighty
Solution Sage
Solution Sage

Clean your data. The fact that you see an entry twice does not mean this is the same entry. There are invisible characters at play here. Just standardize your entries.

Anonymous
Not applicable

I checked, data is clean. 

The yearly data is actualy pulled in a yearmonth format (i.e. 202001) and in the appened query i transformed it to date by adding 01 (Yearmonth & "01"). 

then added the relationship to the date table.

I still get the error above.

any thoughts on that??? THANKS!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors