Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, new to Qlik and the front end Syntax!
I'm essentially trying to sum my total PLANNED HOURS if TPROG (A different field) is greater than Zero. I initially Num#(TPROG) in the DLE but went back to making it text because it's different codes. it currently is text - and looks like this
I don't mind changing it back to Nums but only some of them actually change. This is what I'm doing using set analysis to try to get a bar graph of total planned hours.
Sum({<TPROG ={">0"}>} [Planned Hours])
The above formula was when it was still Nums. It didn't work.
Any help/input would be appreciated
To achieve it you should add a new field in DLE as below:
...
...
If( IsNum(TPROG) = -1, 'Y', 'N' ) as isNumeric
then in UI you can use the below expression:
Sum( {< isNumeric = {'Y'} >} [Planned Hours] )
I hope it can helps.
Best Regards
Hi @TaterTot ,
That field is a text (ex. AMBK) so how could you check if it's greater than 0?
To me It does not makes sense.
Best Regards
I'm wondering if possibly I need to also exclude all the texts and only consider the number fields?
To achieve it you should add a new field in DLE as below:
...
...
If( IsNum(TPROG) = -1, 'Y', 'N' ) as isNumeric
then in UI you can use the below expression:
Sum( {< isNumeric = {'Y'} >} [Planned Hours] )
I hope it can helps.
Best Regards
That's how Sum() works in the first place, I believe.
Load * Inline [
Field1
1,
2,
3,
A,
B,
C
];
num#() will return a numeric null for non-numeric values, so you should also be able to use that if you need to.