Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
HI,
I am using the function 'Sameperiodlastyear' and I know about 'dateadd'
I have a chart that looks like this:
However, my issue is that Thanksgiving falls on a different days of the year, so things can get skewed. I can't compare Nov 28 to Nov 28 for example. I need to be able to compate Nov 26 to Nov 28. I know I can use dateadd to move up or down a day or so, but I would like a slicer(or something) that will allow a user to dynamically shift those days so that we are comparing Thanksgiving day to Thanksgiving day.
Any ideas out there? I have some other slicers set up, while summing works great, it starts falling apart when I want to see day to day comparisons.
TIA,
MIke
You could make a disconnected table with GENERATESERIES(-10,10,1), for example and use the Value column from that in a slicer as your # of days to offset. You can then use EDATE(MIN(Date[Date]), -12) + SELECTEDVALUE(Offset[Value]) in a variable for your min date, do the same for max date and use those two variables in your CALCULATE filters to get the same period last year w/o time intelligence.
Or you could wrap SAMEPERIODLASTYEAR with DATEADD and use the SELECTEDVALUE as the days to offset in DATESADD.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi,
Ok, I created this:
Ok, thank you... let me give it a shot....I don't consider myself a Dax Pro. 😅
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 40 | |
| 36 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 73 | |
| 72 | |
| 38 | |
| 35 | |
| 26 |