Hey, I have a quick question for using FiscalPeriod in Slicer. I have a field called FIscalPeriod in my Date table. I wanted to use Slicer on PowerBI. The original data type for FiscalPeriod is text, which did not allow me to use the Slicer in PowerBI, so I changed the data type to Whole number, which was fine at the first look. But when I moved the slicer, I saw FiscalPeriod 201920. Is it possible to find a way to limit to the value to the range of the real FiscalPeriod value?
Hi, @Harsh, thank you very much. I have my own fiscal year table in our system, so I am king of stuck to the table I have. as you can see below, my fiscal period for 2019 ends with 201912. But when I grab this field to my slicer, it shows value greater than 201912, which I believe it is due to the data type for FiscalperiodID is whole number? How can I limit the fiscal period to a valid number (such as 201910, 201912, not 201920)?
Hi @Mike. When you use a whole number data type in a slicer like the one you’ve shown with a slider, you get all integers between your first and last entry, hence 201920. Use type text, perhaps with a normal list or dropdown slicer. Greg
Hi, @Greg, that was what I thought. I really want to take advantage of the Slicer function, however, Type Text does not allow me to do so. Do you know if there is a way around? Thanks!
I can see there is an issue with some of the data (highlighted) is for jan 2020 has fiscal 2019 which doesn’t make sense either. Feb 2020 has month 1 which to me is start of a new fiscal year. (doesn’t make sense unless the fiscal year starts in feb 1.)
Hi, @Harsh Harsh, attached you will see the sample file, on the visual, when you move the slicer, you will see the fiscal period grater than 12, such as 201920.
I guess it is due the data type for fiscalperiodID (as whole number), but would like to know if there is a workaround.
The re-sort that you’ve made in your date is not correct. Because if your Fiscal Year starts from 1st Feb then it should also have an retrospective effect in your date table which I don’t see. Below are the screenshots provided for the reference -
In the above screenshots, you’ll observe that your Fiscal Year for 2018 starts from 3rd Feb and ends on 1st Feb whereas it should have been 1st Feb and 31st Jan respectively.
Alternatively, for the year 2019 and 2020 also, there’s the same problem. I’m attaching the screenshot below for the year 2020 where your Fiscal Period although starts from 1st Feb but ends 2 days before the actual end of the Fiscal Year.
Also upon checking the format of the FiscalPeriodID in your file I absolutely don’t see any type of problem where it’s been converted into the text because it’s having “Int64.Type” format so it’s already been there in the number format.
Still I’m curious to know if it’s possible for you to change your date table to the one which is already available on the Forum and this is the compact and the concise date table that one can have in their report.
Hi @Harsh,
Mike stated that their company fiscal year starts in February. I asked the question earlier just to make sure to see if the query wasn’t setup correctly.
@Mike, you might want to check your date query to ensure that it is working correctly?
Hi, @Harsh and @Keith our fiscal year starts from the first weekend of Feb, so the start of each fiscal year is different depending on the start of first week of Feb.
Converting to Text is not problem, the problem is the filter will not have the slicer option when the data type is Text, which is the place I struggled with.
I think it might be the query code that creates the date table might needs to be changed to reflect what you need. I think that where @Harsh is coming from.
I come from a financial background , usually the fiscal year starts the first day of the month not the first weekend in month. (i never seen it before). That is why i question about the fiscal year start.
The Date table comes from our SQL server, so we have no option to switch to other date table, but would like to know any solution to make Slicer work, otherwise, we can live with the drop-down menu with Text Type.
I’m wondering if you can update your m code to insert a column within date table to reflect what you need for the slicer. I’m new to power bi but @Harsh likely would be able to help with that coding.