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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
danwilson1
Frequent Visitor

Using a slicer to switch the axis of the graph

I want to create a graph that shows the number of days between one of the date columns and today's date. I would like to be able to switch the measure using a slicer (e.g. Days since Actioned_Date, Days since Called_Date, Days until Closure_Date) and have the table results update

 

In addition, I would like to group the days between into groups to make the graph easier to read (e.g. 0-7 days, 14 days, 21 days etc).

 

The end graph should then show the distinct # ID where 7 days have passed since Actioned_Date etc

 

My data looks like this:

IDActioned_DateCalled_DateClosure_Date
1235671/1/20225/1/20223/3/2022
15684210/1/202212/1/20224/4/2022
    
    
    
    
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @danwilson1 ,

 

According to your requirements description, you want to achieve the requirements of "Using a slicer to switch the axis of the graph", I have made a related method for your reference based on the sample data you provided, you can first create three measures.

Days since Actioned_Date =DATEDIFF(SELECTEDVALUE('Table'[Actioned_Date]),TODAY(),DAY)

Days since Called_Date =DATEDIFF(SELECTEDVALUE('Table'[Called_Date]),TODAY(),DAY)

Days until Closure_Date =DATEDIFF(SELECTEDVALUE('Table'[Closure_Date]),TODAY(),DAY)

Then create a "Field parameter", which is a preview feature that may require you to update to the latest version of desktop and enable this preview feature, which you can create and set up as such.

vtangjiemsft_0-1675328168169.pngvtangjiemsft_1-1675328205960.png

Then you can create a visual like this and place this parameter, and the "Field parameter" will automatically produce the slicer of the field for you.

vtangjiemsft_2-1675328234338.png

For a detailed description of the functions of "Field parameter", please refer to this document:

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

 

Regarding what you said later about grouping dates based on a period of time, I doubt the possibility of this feature being implemented in Power BI, you can refer to the "Group and bin" function to check if it can be implemented, which is the official documentation.

Use grouping and binning in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Neeko Tang

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

 

View solution in original post

3 REPLIES 3
danwilson1
Frequent Visitor

Hi there; thank you for your detailed response! Unfortunately I am not able to get the latest version of a power BI desktop yet. Are you aware of another workaround that doesn't require the Field Parameter function?

Anonymous
Not applicable

Hi @danwilson1 ,

 

Unfortunately, the field parameter may be the only way to do it at the moment. You can check whether the current version of desktop can enable the field parameter function, if not, please refer to this link to get the latest version.

 

Best Regards,

Neeko Tang

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

Anonymous
Not applicable

Hi @danwilson1 ,

 

According to your requirements description, you want to achieve the requirements of "Using a slicer to switch the axis of the graph", I have made a related method for your reference based on the sample data you provided, you can first create three measures.

Days since Actioned_Date =DATEDIFF(SELECTEDVALUE('Table'[Actioned_Date]),TODAY(),DAY)

Days since Called_Date =DATEDIFF(SELECTEDVALUE('Table'[Called_Date]),TODAY(),DAY)

Days until Closure_Date =DATEDIFF(SELECTEDVALUE('Table'[Closure_Date]),TODAY(),DAY)

Then create a "Field parameter", which is a preview feature that may require you to update to the latest version of desktop and enable this preview feature, which you can create and set up as such.

vtangjiemsft_0-1675328168169.pngvtangjiemsft_1-1675328205960.png

Then you can create a visual like this and place this parameter, and the "Field parameter" will automatically produce the slicer of the field for you.

vtangjiemsft_2-1675328234338.png

For a detailed description of the functions of "Field parameter", please refer to this document:

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

 

Regarding what you said later about grouping dates based on a period of time, I doubt the possibility of this feature being implemented in Power BI, you can refer to the "Group and bin" function to check if it can be implemented, which is the official documentation.

Use grouping and binning in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Neeko Tang

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

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.