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

working fine with straight table but not with kpi's charts

Hello All,

What making me confuse is i am using same dimension  and same expression in two diff charts (kpis,straight table),but i am getting two diff results

i mean ..my default when end user open dashboard he as to see all the location aduit score ...which is working fine in both table chart and kpi chart ....

if he goes feather and select only particular location from the drop down then he should only see that selected location with score ...

which is working great in table but its not working in kpis charts,

what i looking is when i select  location, only selected KPI chart  has to show the value the rest kpi chart  needle should be at zero....

straight table:

dimension:LOCATION

expression:Sum({<ADATE={"$(=max(ADATE))"}>}OVERALL_SCR)(working fine)

kpi chart:(chanderia kpi chart)


dimension:LOCATION

expression:Sum({<LOCATION={'CHANDERIA'},ADATE={"$(=max(ADATE))"}>}OVERALL_SCR)

Help me in resloving this task,

Please find the attachment(data screen short)

thanks

naveen

1 Solution

Accepted Solutions
sunny_talwar

Found the problem. You need to remove the LOCATION from dimension. Check out the attached

View solution in original post

30 Replies
sunny_talwar

Can you try this may be for Chanderia location and do the same for the other locations as well.

=GetFieldSelections(LOCATION) = 'CHANDERIA', Sum({<LOCATION = {'CHANDERIA'}, ADATE ={"$(=Max(ADATE))"}>} OVERALL_SCR), 0)

kunkumnaveen
Specialist
Specialist
Author

Hello sunny,

i think something is missing in the expression syntax do we need to use any if statment,because the result i am getting is

                            NO DATA DISPLAY

I JUST COPY PASTE UR EXPRESSION

=GetFieldSelections(LOCATION) = 'CHANDERIA',Sum({<LOCATION = {'CHANDERIA'}, ADATE ={"$(=Max(ADATE))"}>} OVERALL_SCR), 0)

THANKS

NAVEEN

sunny_talwar

Oh sorry, forgot to add if

=If(GetFieldSelections(LOCATION) = 'CHANDERIA', Sum({<LOCATION = {'CHANDERIA'}, ADATE ={"$(=Max(ADATE))"}>} OVERALL_SCR), 0)

kunkumnaveen
Specialist
Specialist
Author

Hello Sunny ,

one  problem is solved, but this solution bring me a new problem what i mean is

step1:

my default without selection, the end user has to see all the three locations score  ,chanderia,deberia,zawar


step2:

if he select any particular location from drop down then the selected kip chart needle has to show the score,

the rest two kpi's chart needle should be zero


by writhing your expression i am achieving step2:

but by  default i  need step 1:


may be in the expression the getfieldselection might not need


thanks

naveen





sunny_talwar

Try this:

=If(SubStringCount(Concat(DISTINT LOCATION, ', '), 'CHANDERIA') = 1, Sum({<LOCATION = {'CHANDERIA'}, ADATE ={"$(=Max(ADATE))"}>} OVERALL_SCR), 0)

kunkumnaveen
Specialist
Specialist
Author

Hello Sunny,

The expression working fine with CHANDERIA location ,but its not working on two other location even though i replace

location name like this

=If(SubStringCount(Concat(DISTINCT LOCATION, ', '), 'DEBARI') = 1, Sum({<LOCATION = {'DEBARI'}, ADATE ={"$(=Max(ADATE))"}>} OVERALL_SCR), 0)

=If(SubStringCount(Concat(DISTINCT LOCATION, ', '), 'ZAWAR') = 1, Sum({<LOCATION = {'ZAWAR'}, ADATE ={"$(=Max(ADATE))"}>} OVERALL_SCR), 0)

i was very happy that i achieved this requirement,when chanderia kpi chart was working ,

thanks

naveen

sunny_talwar

For the first expression, is it DEBARI or DARIBA? From the screenshot it seems that it might be DARIBA unless this is a different location?

kunkumnaveen
Specialist
Specialist
Author

HELLO,

DEBARI

PLEASE FIND THE ATTACHMENT (DATA SLIDE )

sunny_talwar

If you put this in a text box object -> =SubStringCount(Concat(DISTINCT LOCATION, ', '), 'DEBARI') do you see 1 when DEBARI location is selected? Similarly try this -> =SubStringCount(Concat(DISTINCT LOCATION, ', '), 'ZAWAR') to gives you 1 when ZAWAR is selected.

I want to make sure the if statement is the issue or the expression itself is the issue