Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
New to Qlik sense.
I have the following IF statement but im trying to bucket it by a dimension and SUM the count to put it into a KPI. Ive been trying the Sum(aggr( functions but have had no luck. Thank you in advance.
if(Count([Logs.RobotName]) > 0 and count([Logs.AutomationName])>0 and count([Logs.MachineId]) > 0 and [Licenses.IsDeleted] = 0, 1, 0 )
It's hard to tell you an working answer without sample data and expected outcome. Assume you want following biz logic in KPI,
Sum( Total sum of your if-else count by dimensions )
Then you can try below:
SUM(
Aggr(
SUM(
if(Count([Logs.RobotName]) > 0
and count([Logs.AutomationName])>0
and count([Logs.MachineId]) > 0
and [Licenses.IsDeleted] = 0
, 1, 0)
)
, dim01, dim02)
)
Hi Angela,
I added a screenshot of the data, the If else statement I put in populates the Active column and essentially i would like to be able to SUM the Active column into a KPI. So out of the 38 rows, 30 are considered active and show that 30 in a KPI.
I was able to solve my issue, i appreciate the help.
Sum(
{$<[Licenses.IsDeleted] = {'0'}>}
Aggr(
if(Count([Logs.RobotName]) > 0
and count([Logs.AutomationName])>0
and count([Logs.MachineId]) > 0
, 1, 0)
, Dim))