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
Anonymous
Not applicable

Line graph with 2 lines from same table but have separate interaction filters

Hopefully this doesn't get too confusing. I will try to use examples where possible! So my problem is, I am trying to create a line graph with 2 lines (year A and year B) from a single table (data source). I then want to filter these lines separately with a slicer e.g. changing filters for line 1 will only affect that line and line 2 will remain as is on the graph for comparison purposes. See image below. 

 

linegraph.png

 

The only way i can get this to work at the moment is by duplicating my table (data) and creating 1 line from original table and creating line 2 from duplicate table. Then i can create seperate slicers which affect each line separately.

 

This would work for a small dataset but once the data gets larger, duplicating is not an option and i would like to do this from a single table. Is this possible on PowerBI?

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

If I understand correctly, you want to achieve this result: one of two lines in the same line chart can be filtered by the slicer, but the other one will not affected by this slicer. Sorry that I haven't found a better solution than your existing workaround (add a duplicate visual). You can have a look at the posts in this thread and check if you can get a different idea from it.

Best Regards

Rena

Anonymous
Not applicable

@Anonymous Yes this is essentially what im trying to do, I will have a read and keep looking to see if there is a way.

 

@amitchandak Oh that does sound a bit confusing for me, i'm not completely there yet with my PowerBI knowledge.

amitchandak
Super User
Super User

@Anonymous , If the two lines are two measures and need to filter on two different dimensions. You can use All for the dimension for which filter should not pass

Line 1 = calculate([Measure],all(Dim1))

Line 2 = calculate([Measure],all(Dim2))

Refer

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/

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

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors