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

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.

Reply
Anonymous
Not applicable

Toggle between fiscal and calendar year using slicer

So I have a data set of sales, but sometimes it can be viewed in a calendar year (Jan-Dec) or a fiscal year (Nov-Oct). 

I want to allow users to toggle between calendar year and fiscal year. I have a table that is just 

  • Calendar
  • Fiscal 

I have a slicer that requires the user to select one or the other. 

I have a measure:

Value Select =
VAR Selection = SELECTEDVALUE('Disconnected Slicer'[Value Selection], "Calendar")
RETURN
Selection
 
It returns the correct value based on what is being selected in the slicer. 
I also have a date table created with date, year, month, fiscal year, etc. 
I want to say that if the selected value is "calendar" then use the calendar year, else use fiscal year. 
If I create a calculated column = [Value Select], I only get calendar, even if Fiscal is selected. 
 
Is there anyway to do this? I want it so the whole report is synced based on calendar/fiscal, and there's many different variables being used that could be affected by this - so trying to avoid creating a lot of measures. 
 
I know about switch() and it only works using other measures, but not columns. 

I also would need to bring this to a column level not measure because I need the years to be on an axis. 
 
I even thought about creating two columns named fiscal and calendar, but since this was calendar table was created using DAX formula, I can't see it it query editor to unpivot it. 
Any ideas?? Is it even possible? 
1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

I'm afraid slicer can only filter rows in table, slicer can't filter table or columns.

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
MalJan19
Frequent Visitor

You can combine bookmarks, the selection pane, and buttons to give users the ability to toggle between seeing visuals on a calendar basis or a fiscal basis. When the calendar button is selected, the fiscal visuals would be hidden and the calendar visuals displayed. When the fiscal button is selected, the calendar visuals will be hidden and those based on the fiscal calendar will be displayed.

v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

I'm afraid slicer can only filter rows in table, slicer can't filter table or columns.

 

Regards,

Jimmy Tao

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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