Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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.
@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.
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.
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 ReportingCheck out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!