Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all,
I have a column called HOURS_SINCE_DISCHARGE.
Its contents vary between 0 and 1000.
I want to count all instances of non-zero.
For example, I have 13 records, 5 are zero (contents = "0") and 8 non zero. I am not sure if the 0 is a number or text string, but the data was imported from Excel and was a number format, value 0, in excel.
So, what what expression would I use to count non zero?
(Am new to Qlik).
I have the below, but it's counting every instance.
Count(HOURS_SINCE_DISCHARGE>0)
I have this in the Expression field in the Data section of the report element.
Thanks for helping with such a simple question. I googled an answer first, but couldn't find anything.
Tim
Try this:
=Count(If(HOURS_SINCE_DISCHARGE > 0, HOURS_SINCE_DISCHARGE)) or
=Count({<HOURS_SINCE_DISCHARGE = {'>0'}>} HOURS_SINCE_DISCHARGE)
Try this:
=Count(If(HOURS_SINCE_DISCHARGE > 0, HOURS_SINCE_DISCHARGE)) or
=Count({<HOURS_SINCE_DISCHARGE = {'>0'}>} HOURS_SINCE_DISCHARGE)
Response went into moderation:
Try this:
=Count(If(NOT WildMatch(hours_since_discharge,'0'),hours_since_discharge))
happy to help!
Sreeni
Thanks Sunny! Worked perfectly.
Is there a clear user guide on matching/functions/how to write these checks? Google couldn't reveal it which is why I ended up posting.
Tim