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
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
v-yetao1-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
v-yetao1-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.

v-yetao1-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.

Hi @v-yetao1-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

 

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
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.