Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
schneider2037
Creator
Creator

Set Expression Problem

I've ISSUE_IDs that I want to count the distinct number where the ISSUE_ID = 0 AND is not a member of a list of fuel types.

Here's what I've got so far, and just returns  "Error in Expression"

=COUNT({<CLOSED_ISSUE={"0"}, UNIT_FUEL_TYPE -={"PROPANE", "GAS, "CNG", "DIESEL"}>} DISTINCT ISSUE_ID)

Is this even remotely close to the right syntax?

Full disclosure: these set expressions are something still not really all that great at...


Thanks in advance for any guidance.


~Jonathan

1 Solution

Accepted Solutions
MarcoWedel

missing double quotes after GAS

View solution in original post

6 Replies
vishsaggi
Champion III
Champion III

Try this?

= COUNT({< CLOSED_ISSUE = {0}, UNIT_FUEL_TYPE -={'PROPANE', 'GAS', 'CNG, 'DIESEL'} >} DISTINCT ISSUE_ID)

Colin-Albert

Hi Jonathon,

Double quotes should be used to contain search expressions in set analysis, single quotes should be used to define text.

there is no need for quotes around numbers.

=COUNT({<CLOSED_ISSUE={0}, UNIT_FUEL_TYPE -={'PROPANE', 'GAS', 'CNG', 'DIESEL'}>} DISTINCT ISSUE_ID)


The difference between single and double quotes has not always been applied.

See these posts Quotes in Set Analysis

Set analysis difference between single quote and double quote

schneider2037
Creator
Creator
Author

HHmm. Nope. CLOSED_ISSUE is definitely text "1" or text "0" (don't ask...I inherited)...drat.

vishsaggi
Champion III
Champion III

So just use like {'0'}

MarcoWedel

missing double quotes after GAS

schneider2037
Creator
Creator
Author

doh!