March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I have a data set with sales data from dates between 1/1/2017 through 12/31/2020.
I want to be able to report this data to different departments. Some departments use Fiscal year and some use Calendar year.
So that I can report in the respective departments' language, I'd like it so that I have a slicer that toggles between 'Fiscal' and 'Calendar' year and another one that has "2017", "2018", "2019", "2020" options (this latter part I already know how to do, of course).
Ultimately, what I want is that if I use the slicer and select "fiscal" and then "2018", it would pull data from April 1st, 2017 - March 31st, 2018. Likewise, if I were to select "Calendar" and "2018", it would pull data betwen January 1, 2018 - December 31, 2018.
I'm completely lost, does anyone know how I would do this? I would use it in a lot of reports and in an executive-facing dashboard, so I'd like to be able to replicate it across reports too.
Thanks!
Solved! Go to Solution.
@APM You can create an additional table off your date table to have both years and the ranges. I've included a PBIX file with this set up.
The Date table I used:
Edit: I changed it to reference the Date table instead, so if you wanted to change the range, you only have to in one place!
Edit 2: Re-reading your post, your fiscal calendar starts in April, so just changed the start month to 4.
Final note, in the Date table I havethe Month as a date, which I then formated custom to be in the mmm yyyy format on the modeling tab. This also allows for you to use it as either continuous or categorical in the x-axis on charts.
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
@APM You can create an additional table off your date table to have both years and the ranges. I've included a PBIX file with this set up.
The Date table I used:
Edit: I changed it to reference the Date table instead, so if you wanted to change the range, you only have to in one place!
Edit 2: Re-reading your post, your fiscal calendar starts in April, so just changed the start month to 4.
Final note, in the Date table I havethe Month as a date, which I then formated custom to be in the mmm yyyy format on the modeling tab. This also allows for you to use it as either continuous or categorical in the x-axis on charts.
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Thanks! And so, when I import my data, I add the relationship so that the data in my Sales dataset is tied to either the date column in the Date table or the date column in the Switch Calendar table, correct? Because it won't let me create a relationship with both.
Or do I need to do something else?
@APM Great question, yes you would want to create the relationship between the Sales data and the Date table only. The only table Switch Calendar should have a relationship with is the Date table.
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
i did the same process and folloe the all steps but data is not getting reflacted
I would approach it this way:
You then add two buttons. You would actually do the same logic - put them on top of each other. Each button calls the other bookmark via its action properties.
To the end user, this looks like a simple slicer toggle.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |