Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnSamuel123
Creator
Creator

Line graphs as a percentage

hi experts,

looking for some help, apologies in advance as i am new to qlik!

im pulling data from a excel file(attached) and i need to do 2 simple line graphs showing the % of selections in field "mode" and "c" was used in  a certain week. However its not showing up with the correct %'s and i cant understand why? 

im using the wk-YY field as my x-axis in my line graphs. i used the expression "count( [Mode])/count(total "values")" and it works for a single week of data:

JohnSamuel123_0-1618936827199.png

 

but once i select numerous weeks, the line graphs dont have the correct %,(notice the different %  for week 2021-15):

JohnSamuel123_1-1618936869482.png

 

any help in getting the correct formula to show the total % of each mode and C type in a graph per week would be really appreciated

thanks

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You want to divide by the total per week, not the overall total.  So your expression should be:

count( [Mode])/count(total <[Wk-YY]> "Values")

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You want to divide by the total per week, not the overall total.  So your expression should be:

count( [Mode])/count(total <[Wk-YY]> "Values")

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com