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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Create line charts for different categories of products in different dates

I'm given a table that shows different kinds of products under six months. Here is an example of the test data. I want to achieve a situation such that every time I click the specific item in my matrix, it will show the spending from January to July in a line chart or bar chart. I know I need to use Format - edit interactions - select the filter. But they are combined into one column, just like what I've attached below. My x axis is the product name, y axis is several items - Jan's spending, Feb's spending, Mar's spending...July's spending. 

The test data is like:

 JanFebMarAprMayJunJuly
Product A11001000558077
Product B12001010568178
Product C130681020578279
Product D06910311588380
Product E1407001259840
Product F1507101360850
Product G1607201461862

Screenshot 2024-09-16 135430.png

Hope someone can help me out!

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous 
To filter the other visuals by-product but ignore the month's filtering you need 2 moths/calender tables.
first for filtering the report + matrix
and second just for the related visual.

The model will look like this:

Ritaf1983_0-1726541672337.png

 

Then you can create 2 measures for matrix standard sum ( or other needed calculation)

sum_ = sum('Table'[Value])
NOTE: you should drag to the matrix month from the "months table"
Ritaf1983_1-1726541751699.png

 


And for related graph the measure will be :

graph_sum = CALCULATE([sum_],REMOVEFILTERS(Months[Month]))
Now you can create a graph with months from the months table :
Ritaf1983_4-1726542182147.png

 


Result :

Ritaf1983_5-1726542214577.png

 


and both of them reflecting by slicer from the filter table:

Ritaf1983_6-1726542238145.png

The pbix is attached

If my answer was helpful please give me a Kudos and accept as a Solution.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @Anonymous 
To filter the other visuals by-product but ignore the month's filtering you need 2 moths/calender tables.
first for filtering the report + matrix
and second just for the related visual.

The model will look like this:

Ritaf1983_0-1726541672337.png

 

Then you can create 2 measures for matrix standard sum ( or other needed calculation)

sum_ = sum('Table'[Value])
NOTE: you should drag to the matrix month from the "months table"
Ritaf1983_1-1726541751699.png

 


And for related graph the measure will be :

graph_sum = CALCULATE([sum_],REMOVEFILTERS(Months[Month]))
Now you can create a graph with months from the months table :
Ritaf1983_4-1726542182147.png

 


Result :

Ritaf1983_5-1726542214577.png

 


and both of them reflecting by slicer from the filter table:

Ritaf1983_6-1726542238145.png

The pbix is attached

If my answer was helpful please give me a Kudos and accept as a Solution.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

Hii,

 

I still don't quite understand the first part you said "

but ignore the month's filtering you need 2 moths/calender tables.
first for filtering the report + matrix
and second just for the related visual.

The model will look like this:"

How to achieve the attached picture you've provided. Do I need to import data?

 

Thank you so much!

Hi @Anonymous 
No, you can duplicate the date table from the power query, I provided Pbix, you can follow my steps.

If my answer was helpful please give me a Kudos and accept as a Solution.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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 Kudoed Authors