cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aallman
Helper I
Helper I

Stacked Bar and Line Chart with measure

I am trying to create a chart that shows counts of items in different "Late Reason" buckets per day as well as show a line of % On Time on the secondary Y axis. I think I am using the wrong formula in my measure for % On Time because the values are all way over 100%. Here is the formula I am using now:

aallman_0-1661552472556.png

Here is what the chart looks like:

aallman_1-1661552591011.png

 

I don't know how to get the % On Time to just be the number of Reference Numbers that are On Time Ship=True() on a day over the total Reference Numbers on that day. 

 

What am I doing wrong?

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@aallman yes, you can use REMOVEFILTERS DAX function

 

Your Measure = 
CALCULATE ( <<AGGREGATION EXPRESSION>>, REMOVEFILTES ( Table[Column] ) )

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 

 






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@aallman yes, you can use REMOVEFILTERS DAX function

 

Your Measure = 
CALCULATE ( <<AGGREGATION EXPRESSION>>, REMOVEFILTES ( Table[Column] ) )

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 

 






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User
Super User

@aallman you cannot do that, for that you need to write a measure and put the filter in the measure.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





How would I do that? I want the measured %On Time to include all lines but I don't want the bars to include lines that are On Time Ship = True. Is there a way to tell my % On Time measure to ignore the filter applied to the visual?

 

parry2k
Super User
Super User

@aallman can you post sample data and the measure you are using and the expected output?

 

Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Actually I found out the issue was I was filtering to only Ship On Time = False on the page level. But I do need the bars to use that filter and then the line to NOT use that filter. how do I apply a filter to only one of the variables in a visual?

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors