Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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 ReportingStarting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
85 | |
83 | |
72 | |
49 |
User | Count |
---|---|
142 | |
137 | |
110 | |
69 | |
55 |