Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi Experts,
I have a requirement to dynamically customize my date slicer based on country selection.
If the user selects INR (India) as the Country →
The slicer should display Fiscal Year (Apr–Mar).
If the user selects any other country →
The slicer should display Normal Calendar Year (Jan–Dec).
STEP 1) Create Required Columns in Date Table
Calendar Year column:
Calendar Year = YEAR('Date'[Date])
Fiscal Year column (Apr–Mar):
Fiscal Year = YEAR(EDATE('Date'[Date], -3))
Optional Fiscal Label:
Fiscal Year Label = "FY" & FORMAT([Fiscal Year], "0000")
STEP 2) Create Two Separate Slicers
Calendar Year slicer
Field: Date[Calendar Year]
Rename in Selection Pane: Slicer_Calendar
Fiscal Year slicer
Field: Date[Fiscal Year Label]
Rename in Selection Pane: Slicer_Fiscal
Place both slicers in the same location (stacked on top of each other).
STEP 3) Create Bookmarks
Go to View → Selection Pane
Go to View → Bookmarks Pane
Create Bookmark 1:
• Show Slicer_Calendar
• Hide Slicer_Fiscal
• Add Bookmark
• Name: Calendar View
• Uncheck "Data"
• Keep only Display checked
Create Bookmark 2:
• Show Slicer_Fiscal
• Hide Slicer_Calendar
• Add Bookmark
• Name: Fiscal View
• Uncheck "Data"
• Keep only Display checked
STEP 4) Add Buttons to Toggle
Insert → Buttons → Navigator → Bookmark Navigator
In Format pane:
Select only these two bookmarks:Calendar View
Fiscal View
Style it as Tabs or Buttons
Hi! Great requirement — this is totally doable in Power BI without any custom visual. The trick is to build both year types into your Calendar table and then use a calculated column to expose the right label based on a country slicer selection. Here's how I'd approach it:
Step 1 — Add both year columns to your Calendar table
daxFiscal Year =
"FY" & IF(MONTH('Calendar'[Date]) >= 4, YEAR('Calendar'[Date]), YEAR('Calendar'[Date]) - 1)
& "-" & RIGHT(TEXT(IF(MONTH('Calendar'[Date]) >= 4, YEAR('Calendar'[Date]) + 1, YEAR('Calendar'[Date])), "0000"), 2)
-- e.g. FY2024-25
Calendar Year = YEAR('Calendar'[Date])
Step 2 — Create a dynamic "Year Label" measure that reacts to the country slicer
daxYear Label =
VAR SelectedCountry = SELECTEDVALUE(Country[Country], "ALL")
RETURN
IF(
SelectedCountry = "INR",
SELECTEDVALUE('Calendar'[Fiscal Year]),
SELECTEDVALUE('Calendar'[Calendar Year])
)
Step 3 — Build the slicer
Since slicers need a column (not a measure), the cleanest approach is to add a combined column to your Calendar table in Power Query or as a calculated column:
daxYear Display =
IF(
RELATED(Country[Country]) = "INR",
'Calendar'[Fiscal Year],
FORMAT('Calendar'[Calendar Year], "0")
)
Then use Year Display as your slicer field. When the user picks INR from the country slicer, cross-filtering will surface only the fiscal year labels; for any other country, the calendar year labels appear.
One important thing to keep in mind — Power BI slicers filter by values, so if you have both fiscal and calendar years in the same column, make sure the sort order column is set correctly so they display chronologically and not alphabetically.
Hope that help
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.