cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ADN75
Frequent Visitor

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
Ailsa-msft
Community Support
Community Support

Hi @ADN75 

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
Ailsa-msft
Community Support
Community Support

Hi @ADN75 

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.

Ailsa-msft
Community Support
Community Support

Hi @ADN75 

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.

ADN75
Frequent Visitor

Hi @Ailsa-msft 

 

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

@ADN75 , 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

 



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

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
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors