Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
suryakant241187
Partner - Contributor III
Partner - Contributor III

if condition help

I have multiple data of employee like

Quata                  Hours

Legal Last year      3

Legal Leave            2

Overtime                1

but i have to show the hours of Legal Last Year. Please help.

3 Replies
arulsettu
Master III
Master III

try this

count({<Quata={'Legal Last year'}>}Hours)

Chanty4u
MVP
MVP

try below

let vlastyear='Max(year)-1';

count({<Quata={'$(Vlastyear)'}>}Hours)

Anonymous
Not applicable

According to your question we  can write with if statement and also with set analysis.


if statement:


if(Quata='Legal Last year', sum(Hours),0)

// the reason i took sum is because looks like you wanted to do sum of the hours done by the empolyee. if you want to //how many times he did work use count.


Set Analysis which is the better approach:


sum({<Quata={'Legal Last year'}>}Hours)