Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Show if expression greater than x

I want only the rows to show where Expression 3 >=50%. For some reason, I am having trouble with this. I see all the rows.

Dimension: RULE

Expression 1: count( {$<USER_POSITION_FLAG={'y'}>} DLG_EVENT_ID)

Expression 2:  Count (DISTINCT FIRING_RECORD)

Expression 3: count(DISTINCT{$<USER_POSITION_FLAG={'y'}>} DLG_EVENT_ID)/Count (DISTINCT FIRING_RECORD)

Expression 3 Conditional: if( (count( {$<USER_POSITION_FLAG={'y'}>} DLG_EVENT_ID)/Count (DISTINCT FIRING_RECORD))>=.5, count( {$<USER_POSITION_FLAG={'y'}>} DLG_EVENT_ID)/Count (DISTINCT FIRING_RECORD))

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Expression 1:
Count({$<USER_POSITION_FLAG = {'y'}, RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} DLG_EVENT_ID)

Expression 2:
Count(DISTINCT {<RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} FIRING_RECORD)

Expression 3:
Count(DISTINCT {$<USER_POSITION_FLAG = {'y'}, RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} DLG_EVENT_ID)
/
Count(DISTINCT {<RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} FIRING_RECORD)

View solution in original post

2 Replies
sunny_talwar

Try this

Expression 1:
Count({$<USER_POSITION_FLAG = {'y'}, RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} DLG_EVENT_ID)

Expression 2:
Count(DISTINCT {<RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} FIRING_RECORD)

Expression 3:
Count(DISTINCT {$<USER_POSITION_FLAG = {'y'}, RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} DLG_EVENT_ID)
/
Count(DISTINCT {<RULE = {"=Count(DISTINCT{$<USER_POSITION_FLAG = {'y'}>} DLG_EVENT_ID)/Count(DISTINCT FIRING_RECORD) >= 0.50"}>} FIRING_RECORD)
cbaqir
Specialist II
Specialist II
Author

Thanks, my friend!