Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
aj0031724
Partner - Creator
Partner - Creator

above function if condition in expresion should not change with date

Team,

I am using the below expression as "Classification"" .However I don't want the expression to be changed with dimension ""DATE""

Can I use below expression with set analysis to avoid getting affected by DATE.

=if(Above($(vkpivalue))>4 and Above($(vkpivalue),0)>4,'Alarmed',
if(-rangesum(($(vkpivalue)>4),(Above($(vkpivalue),1)>4),(Above($(vkpivalue),2)>4),(Above($(vkpivalue),3)>4),(Above($(vkpivalue),4)>4),(Above($(vkpivalue),5)>4),(Above($(vkpivalue),6)>4))>=4,'Highly utilized',
if(-rangesum(($(vkpivalue)<3),(Above($(vkpivalue),1)<3),(Above($(vkpivalue),2)<3),(Above($(vkpivalue),3)<3),(Above($(vkpivalue),4)<3),(Above($(vkpivalue),5)<3),(Above($(vkpivalue),6)<3))>=6,'Low utilized',
'Standard')))

10 Replies
Kushal_Chawda

how vkpivalue variable is calculated?

sasiparupudi1
Master III
Master III

what is the definition of the variable vkpivalue

aj0031724
Partner - Creator
Partner - Creator
Author

PFA the sample qvw.

vselectedkpi1 =Trim(SubField(concat(GetFieldSelections(KPINAME,'|',100),'|'),'|',1))

vkpivalue is the value of KPI selected

=MaxString({$<KPINAME={'$(vselectedkpi1)'}>} KPIFORMULAS)

My classification gets changed when date is selected. for example-->13/08/2015 without any date selected is-->ALARMED

but as soon I select the same date from staright table the classification gets changed.

I know that above function works on physical rows .........but I need the classification to retain on selected date.(May be either by keeping tow staright table one static and one dynamic. But not able to do that.

Can I compare the KPI values  at run time  and generate same output without using ÄBOVE"" either throught set analsyis?

jonathandienst
Partner - Champion III
Partner - Champion III

Impossible to say with the amount of information you have For this type of question, a qvw with your data or a representative sample is necessary.

Preparing examples for Upload - Reduction and Data Scrambling

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
aj0031724
Partner - Creator
Partner - Creator
Author

Dear Jonathan,

Attached the qvw .

sasiparupudi1
Master III
Master III

change KIPVALUE expression to

only({<DATE>}$(vkpivalue))

see if it helps

Sasi

aj0031724
Partner - Creator
Partner - Creator
Author

Dear Sasidhar,

Thanks for the response.

However after using the above expression for KPi values --> when you filter to date selection the whole table gets displayed instead of the single date selection .

we must show only the filtered date but with "CLASSIFICATION"UNCHANGED.

Kushal_Chawda

change variable vselectedkpi1 to

Trim(SubField(concat({<DATE=>}GetFieldSelections(KPINAME,'|',100),'|'),'|',1))

aj0031724
Partner - Creator
Partner - Creator
Author

'Dear Kush,

Thanks .

But  Trim(SubField(concat({<DATE=>}GetFieldSelections(KPINAME,'|',100),'|'),'|',1)) expression resulting in empty straight table.