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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Values in graph not filtered by the date slicer (or only the year)

The graph is filtered by date slicer.

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

ADN75_0-1628668210600.png

 

 

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

 

I used this DAX formula for the date slicer : 

 

Date =
VAR MinYear = YEAR ( MIN ( Reporting[Date] ) )
VAR MaxYear = YEAR ( MAX ( Reporting[Date] ) )
RETURN
ADDCOLUMNS (
FILTER (
CALENDARAUTO( ),
AND ( YEAR ( [Date] ) >= MinYear, YEAR ( [Date] ) <= MaxYear )
),
"Calendar Year", "CY " & YEAR ( [Date] ),
"Month Name", FORMAT ( [Date], "mmmm" ),
"Month Number", MONTH ( [Date] ),
"Weekday", FORMAT ( [Date], "dddd" ),
"Weekday number", WEEKDAY( [Date] ),
"Quarter", "Q" & TRUNC ( ( MONTH ( [Date] ) - 1 ) / 3 ) + 1
)

 

 

And the X axis of my graph is Month Name

 

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? 

 

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You can turn off the interaction with the two visuals .You can refer to the link below .

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

Ailsamsft_0-1629188065150.pngAilsamsft_1-1629188065154.png

Best Regards

Community Support Team _ Ailsa Tao

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

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous 

You can turn off the interaction with the two visuals .You can refer to the link below .

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

Ailsamsft_0-1629188065150.pngAilsamsft_1-1629188065154.png

Best Regards

Community Support Team _ Ailsa Tao

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 

So is the visual in the screenshot you provided the final result you want ? Can you provide me with a detailed pbix file and the final result you want ?

 

Best Regards

Community Support Team _ Ailsa Tao

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 

 

No, I just want to have the line in my graph not filtered by the date slicer as the x axis.

For example, if I select only April : 

ADN75_0-1628839465449.png

 

I want to have my graph with all the months (from Jan to Dec not like in screenshot) as the line.

 

How can I provide you my pbix file?

 

Thank you

amitchandak
Super User
Super User

@Anonymous , if you select a range and if you want data less than that range, you can restrict.

 

But if you need more range then, then you need an independent table

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak,

 

Thank you for your answer ! I managed to create my measure "Last 12 Month Forecast" like in your videos.

 

My problem now is to show the whole year :

 

ADN75_0-1628676276549.png

I select a year and the months of the year I want to display (only for production).

Now I try to display all the year (from January to December) on the X axis (only filtered by the slicer on the top left) and have my new measure only filtered by this slicer. But I want my production (the bars) filtered by the slicer on the top right.

 

Do you know if it's possible?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors