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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
UniHelp
New Member

Creating Line Chart with different filters per line?

Hi all, 

 

I am very new to BI and I've been tasked with creating a dashboard to replace some manually created charts for reporting we do. I need to work out how to create a line chart where the same measure is shown across three different groups, and these groups are identified by different fields. See a mock example of the type of excel chart I am trying to replicate below. 

example.png

In Power BI, the three fields for filtering are like this, colour coded:

course code and levels.png

 

 

So essentially with  X axis being Year and Y-axis being the measure (E.g. Pass rate), I then need each line to have a filter from a different field, so 'course code' = AccountingBach of one line, 'Course College' = College of Business for another, and so on. 

How do I apply different filters to each line on a line chart? Is it possible? 

 

I have the following restrictions due to institutional rules: 

-I cannot access the raw data or change the model, that is restricted to a specific team in the University. I can ask them to make changes for me, within reason. 

-I cannot download custom visual, it's against institutional policy. 

 

Thank you for your help, I really appreciate it!

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Please request your team for the following:

  1. Unpivot all columns other than the Field column
  2. Create a Date column in your data Table.  Could be the first month and day of every year
  3. Create a Calendar Table with columns of Year, Month name and Month number
  4. Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
danextian
Super User
Super User

Hi @UniHelp ,
Not being able to manipulate the raw data in Power Query is very limiting. What you can do now is create a measure  for each of the line in your line chart. You may follow this format:

my measure =
CALCULATE (
    [aggregation],
    FILTER ( DataTable, DataTable[Column] = "Something" )
)

Aggregation could be SUM (DataTable[Column]), COUNT(DataTable[Column]), etc.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors