Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
powerbiasker
Helper IV
Helper IV

Can I use 1 slicer for the month # for both Fiscal Year and Calendar Year?

I have 2 slicers: one for Fiscal Year; the other for Calendar Year. I also have 2 slicers for month #: one for Fiscal Year; the other for Calendar Year.

7.PNG

 

The month # of Fiscal Year is different from the month # of Calendar Year, e.g.: the 1st month of Fiscal Year could be the 3rd month of Calendar Year.

 

Can I use 1 slicer for the month # for both Fiscal Year and Calendar Year?

  • For example, if I select a Fiscal Year, I can chose the month # (or range) for Fiscal Year; if I select a Calendar Year,  I can use the same slicer to chose the month # (or range) for Calendar Year.

 

I want to save space...

 

8 REPLIES 8
v-lili6-msft
Community Support
Community Support

hi @powerbiasker 

If Fiscal Year/Month and Calendar Year/Month are in the same date table, then you will get your requirement.

and if Fiscal Year/Month and Calendar Year/Month are different date table, then you need to merge them into one date table or just recreate a date table that contains Fiscal Year/Month and Calendar Year/Month together, now use the fields in slicer from this new date table.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lili6-msft 

 

But how?

 

I use the following DAX to create the calculated table [date_dim].

date_dim = 
VAR basecalendar = CALENDAR(DATE(1990, 1, 1), DATE(2020, 12, 31))
return
generate (
basecalendar, 
var basedate = [Date]
var yeardate = year(basedate)
var monthnumber = month(basedate)
var yearmonthnumber = yeardate * 12 + monthnumber-1
var qtr = concatenate("Q",roundup(month([Date])/3,0))
var fy = IF(MONTH(basedate) <= 4, VALUE(FORMAT(basedate,"yyyy"))-1, VALUE(FORMAT(basedate,"yyyy")))
var fym = IF(MONTH(basedate) <= 4, MONTH(basedate)+8, MONTH(basedate)-4)
return row (
"Year", yeardate,
"Month Number", monthnumber, 
"Month", Format(basedate,"mmmm"),
"Year Month Number", yearmonthnumber,
"Year Month", Format(basedate, "mmm yyyy"),
"QTR", qtr, 
"Fiscal Year", CONCATENATE (fy, CONCATENATE("-",fy + 1)),
"FY Month Number", fym
)
)

 

You can see that [FY Month Number] is different from [Month Number]. But how make them share the same slicer?

hi @powerbiasker 

If so, you just need to use one of them in the slicer.

What is the problem when you use it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lili6-msft 

 

How to create the measure/column for the month # for both Fisca Year and Calendar Year so I can put it in the slicer?

 

9.PNG

 

The mapping of the month # between Fiscal Year and Calendar Year:

9b.PNG

 

hi @powerbiasker 

For your case, you don't need put two slicer, Just use of them as a slicer and another as a table/ card visual.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Can you show me an example how to do it?

 

Thanks.

parry2k
Super User
Super User

@powerbiasker do you have seperate table for fiscal and regular calendar?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

The same date table for fiscal and regular calendar...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.