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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Shanew
Regular Visitor

Replicating filtered line charts as a filtered measure

HI

 

I have created several individual line charts that have different filters on the visuals so that I can plot distinct counts of tasks by ID to show how many tasks in each filtered category. The customer wishes to have these individual plots placed on one single line chart visual with the different filtered vategories as different coloured lines.

 

I know to do this I need to create each filtered category as a filtered measure but when I use the filter function it does not produce the same results as the filtered line chart, I cannot fathom why the values differ. The individual line charts have filters applied and the page displaying the visuals also has filters on it. No matter what I try, i.e. just applyting the filters on the line chart visual only to the measure or applying both line chart and page visuals to the filtered measure the results still differ to the individual line chart visual.

 

Is there some hierarchy regarding visual filters and page filters that needs to be applied when creating measures with filters ?

 

Cheers

 

Shane

 

 

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @Shanew ,

Here’s some information may help you.

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-line-chart

If it still no work, can you please provide a sample of your data model?

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks ... the issue is not the creating of the line charts using my data model, it's the steps needed to create just a single line chart as opposed to multiple individual ones. As I understand to do this I need to create the filters for the individual charts as filtered mesures and then apply these to the values on the single line chart so in effect each measure id a separate line on the one chart, each line being represneted in the legend. The problem I am facing is that creating these filtered measuress does not give the same counts as those that are just created using the line chat UI individually .... so say if I wanted to create a distinct count of a parameter based on excluding several otherr values in other columns in the same table what is the DAX syntax to create such a measure, I have tried using FILTER and NOT IN functions but as said they don't yield the same result as the single line chart that has the same filters applied to the visual and page.

Shanew
Regular Visitor

Thanks .. maybe I am not explaining myself too well ... I have individual plots as below that are created using the line chart visualizations, each of the visualisations has filters applied to the visual and the page these visuals also sit on has filters. In order to get both these plots onto the one line chart visual I know I need to create these as individual mesures with filters that replicate those on the visual and page themselves, and then apply these measures as values on the conbined plot, giving me a legend as each filtered measure,  but the values in the measure do not match the individual plot values no matter how I apply the filters to the measure.

 

For example the plot on the left has a value in Aug of 1343 and has filters on the visual applied to exclude some SR task types and a page filter to exclude some status types, the visual then produces a distinct count of tasks. I need to replicate this as a measure but applying filters to exclude the tasks and the statuses to the distinctcount in the measure do not yield the same figures ...and I can't fathom why ???

 

Shanew_0-1635786636953.png

Any insight greatly appreciated 

amitchandak
Super User
Super User

@Shanew , if you are not using any legend, you can use category as a legend.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.