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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Date slicer filter only one value in graphic and does not affect x axis

Hi All,

 

I have a dashboard like this : 

ADN75_0-1628186672131.png

The graph is filtered by date slicer.

If I select for example january to May on the slicer, it will filter the graph : 

ADN75_1-1628186902461.png

 

My question is simple : 

is it possible to select january to may in the slicer and have the x axis from January to December and the line from January to December too? 

But the bars will be filtered (from January to May).

 

Thank you in advance 😉

 

Best regards

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi@Anonymous,

Hi@ADN75,

 

You can create a new date dimension table to help you achieve this requirement.

 

  1. Create a new table:
Date Table = VALUES('Table'[Month])

 

  1. Create new measure named New Sales an New Profit.
New Sales = 

IF(

MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),

CALCULATE(MAX('Table'[Sales]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month])))

)

 

New Profit = 

IF(

MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),

CALCULATE(MAX('Table'[Profit]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month]))),

0

)

 

Put the New Profit and New Sales instead of the original one.

Then you can use the new “month” in Date table to interact with the visual.

You will get the result like this:

vcaitlynmstf_1-1628737268893.png

 

 

Here is the demo, please try it.

 

If this does not solve your problem, please provide more details and be free to let me know.

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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

8 REPLIES 8
Anonymous
Not applicable

Hi@Anonymous,

Hi@ADN75,

 

You can create a new date dimension table to help you achieve this requirement.

 

  1. Create a new table:
Date Table = VALUES('Table'[Month])

 

  1. Create new measure named New Sales an New Profit.
New Sales = 

IF(

MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),

CALCULATE(MAX('Table'[Sales]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month])))

)

 

New Profit = 

IF(

MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),

CALCULATE(MAX('Table'[Profit]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month]))),

0

)

 

Put the New Profit and New Sales instead of the original one.

Then you can use the new “month” in Date table to interact with the visual.

You will get the result like this:

vcaitlynmstf_1-1628737268893.png

 

 

Here is the demo, please try it.

 

If this does not solve your problem, please provide more details and be free to let me know.

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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 @Anonymous 

 

thank you for your help ! 

"Profit" and "Sales" are measures in another table... so I didn't manage to use them in your DAX formula..

Anonymous
Not applicable

Hi @Anonymous,

If another table already has a Month column and you want to use it as the x-axis, you can pull that column in my measure instead.

Or would you mind providing me with a pbix file without sensitive information so that I can help you better?

 

Best Regards,

Caitlyn Yan

Anonymous
Not applicable

Hi @Anonymous ,

 

ADN75_0-1628758961909.png

 

Sorry, it's in French, my problem is GRAPH_A expected Production Wind is a measure and the error message is : column GRAPH_A expected Production Wind in table Reporting is untraceable and isn't used in this expression.

 

Unfornatelly, I can attach pbix file to my message. Maybe I can send you a pbix by mail?

Anonymous
Not applicable

Hi@Anonymous ,

 

I checked your error message and because you are referencing a measure in the formula, my formula does not work for you.

For your data security, etc., we only support to solve the problem for you on the forum, you can refer to the following article:How to provide sample data in the Power BI Forum 

 

Best Regards,

Caitlyn Yan

amitchandak
Super User
Super User

@Anonymous , if the month is coming from a different table. Try this option or add +0

 

ShowItemwithoutdata.JPG

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello,

 

A bit more explaination : 

I managed to set the date axis from January to December (even if this is not the best solution because if I change the year, I need to change in the Format option of my graph too) : 

ADN75_0-1628272590389.png

On this visual, I just want the line (Profit) from January to December (not from January to July like in the date slicer).

 

Is it possible?

 

Thank you

Anonymous
Not applicable

Hi @amitchandak,

 

The month comes from the same table unfortunatelly. And there are data from May to December for the value I want to show...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors