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
Jay74
New Member

line and column chart, apply filter to column only

Hi,

 

I have a series of data 2 columns in particular, showing status of an item - Open or overdue for different vendors.  I'd like to do a combined line/column chart and filter the colum showing overdue only while the line shows total count (open + past due) per vendor, so the overdues can be shown in context to the total.  Whenn I do the chart and apply a filter for overdue, it filters the column and the line.  any thoughts how I can filter column only?

 

Thanks

2 ACCEPTED SOLUTIONS
bcdobbs
Super User
Super User

You'd have to write a measure to use on the column using CALCULATE to add a filter directly. For example

CALCULATE (
   COUNTROWS ( Item ),
   Item[Status] = "Overdue"
)

 Obviously you'll have to adjust code to your model.

You can then use that as the value for your bar and another measure or the auto measure for the line.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

jeroendekk
Resolver IV
Resolver IV

Hi @Jay74 
For the total one (the one ignoring the filter) you could create a CALCULATE measure with REMOVEFILTER, or the other one you could create a CALCULATE measure that includes the overdue filter. I cannot be more precise without a sample of the data.
But the awnser is a measure with CALCULATE.

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

Best regards,
Jeroen



View solution in original post

2 REPLIES 2
jeroendekk
Resolver IV
Resolver IV

Hi @Jay74 
For the total one (the one ignoring the filter) you could create a CALCULATE measure with REMOVEFILTER, or the other one you could create a CALCULATE measure that includes the overdue filter. I cannot be more precise without a sample of the data.
But the awnser is a measure with CALCULATE.

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

Best regards,
Jeroen



bcdobbs
Super User
Super User

You'd have to write a measure to use on the column using CALCULATE to add a filter directly. For example

CALCULATE (
   COUNTROWS ( Item ),
   Item[Status] = "Overdue"
)

 Obviously you'll have to adjust code to your model.

You can then use that as the value for your bar and another measure or the auto measure for the line.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

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.