Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
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?
I want to save space...
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
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?
If so, you just need to use one of them in the slicer.
What is the problem when you use it.
Best Regards,
Lin
How to create the measure/column for the month # for both Fisca Year and Calendar Year so I can put it in the slicer?
The mapping of the month # between Fiscal Year and Calendar Year:
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
Can you show me an example how to do it?
Thanks.
@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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |