Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

looking for change in expression

Hello

my requiremnt is to show % of each decision filed value of same supplier ,to achieve this in a bar chart

  i took dimension: 1)name1        //(supplier name filed)

                            2)decision    //(accepted,rejected,exception)

and expression i wrote is:

count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}>} Total <name1> PRUEFLOS)



so problem is  while i am showing all the supplier i am getting different valuesscreen1.png

but if i choose one supplier then i am able to get  what i am looking


screen2.png

this is what i am looking ,so i think i need to do a changes in my expression ,any one suggest me what changes should i need to do plz


47 Replies
kunkumnaveen
Specialist
Specialist
Author

the issues is when u select a value from decision field (Accepted,Rejected,Exception Accepted),

if you select either then it giving only 100% as output

sunny_talwar

What do you expect to see when you select Decision?

kunkumnaveen
Specialist
Specialist
Author

Actually i am looking for this out put ,see that JAY GANESH CHEMICAL

pastedImage_0.png

pastedImage_1.png

pastedImage_2.png

sunny_talwar

Try this expression:

count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(1)

kunkumnaveen
Specialist
Specialist
Author

YOU DID IT my friend ,

I was looking for this o/p from last 3 days,thank you very very much,

any chance to explain what does Avg(1) dose

sunny_talwar

The reason I had to add that was because if you remove that, then based on your selection in Decision field you would still see all the three decision types because we are restricting it using set analysis. By multiplying it with Avg(1) which is not restricted by any set analysis, I am indirectly filtering out decisions which are not selected. Learnt this technique recently from master of QlikView swuehl‌ and have been showing it off everywhere ever since.

I would suggest you to spend some time and mark some helpful answers as a lot of people spent their valuable time helping you out. The idea is to select helpful answers which you believe will help other people when they look at this thread in the future.

Thanks,

Sunny

kunkumnaveen
Specialist
Specialist
Author

Hello,

is it possible to show values along with this percentage on same bar ,currently i am showing only percentage

sunny_talwar

Try this:

Dual(Num(count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(1), '##.##% (') &

Num(count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS) * Avg(1), '##)'),

count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(1))

Change format to expression default on Number tab

Capture.PNG

kunkumnaveen
Specialist
Specialist
Author

is it possible to get % like this

JAY GANESH CHEMICAL:  accepted :94.12%( instead of 0.94%)

                                                            rejected :2.94%( instead of 0.03%)

                                                            exception  :2.94%( instead of 0.03%)

sunny_talwar

My bad, try this:

Dual(Num(count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(1) * 100, '##.##% (') &

Num(count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS) * Avg(1), '##)'),

count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(1))

Dual(Num(count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(100), '##.##% (') &

Num(count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS) * Avg(1), '##)'),

count({$<YEAR= , Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} PRUEFLOS)

/count({$<YEAR=,Quarter=, ENSTEHDAT={">=$(vFromdate)<=$(vTodate)"}, Decision>} Total <name1> PRUEFLOS) * Avg(1))

Capture.PNG