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

Set Analysis Issue

Hello - I can't get the syntax in this expression to work with set analysis. Does anyone see an issue?

 

(({$<[Test1] = {"Apple"}>}[Test1]) - {$<[Test1] = {"Orange"}>}[KPD_KPI_ID]+ ({$ <[Test1] = {"Apple"}>}[Test1])) / ({$ <[KPD_KPI_ID] = {"Orange"}>}[Test1])

1 Solution

Accepted Solutions
sunny_talwar

Only thing you can try to change here would be replacing the double quotes with single quotes:

Sum({$< = {'Internal', 'Store'}, [Plant] -= {'Test'}>}[ABC]) / Sum({$< = {'Internal', 'Store'}, [Plant] -= {'Test'}>}[ABC])


I am assuming that X, ABC are all dummy, so when you replace them with the actual do make sure to check for upper case and lower case as everything in here will be case sensitive.


Best,

Sunny

View solution in original post

5 Replies
maxgro
MVP
MVP

there is no function (sum, avg, count, etc....)

sum({$<Region={USA}>} Sales)

also I don't understant your requirement? could you explain?

sunny_talwar

I don't see any sum/count/min/max in your expression???

(({$<[Test1] = {"Apple"}>}[Test1]) - {$<[Test1] = {"Orange"}>}[KPD_KPI_ID]+ ({$ <[Test1] = {"Apple"}>}[Test1])) / ({$ <[KPD_KPI_ID] = {"Orange"}>}[Test1])

This part needs to be something like this:

({$<[Test1] = {"Apple"}>}[Test1]) - > Sum/Count/Min/Max/Only({$<[Test1] = {"Apple"}>}[Test1])


and similarly all the individual parts would need a aggregation in the expression.


HTH


Best,

Sunny

Not applicable
Author

Hi Sunindia, thank you for helping! Do you see an issue with this set analysis syntax? its not working either

 

Sum ({$< = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])/ Sum ({$ < = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])

sunny_talwar

Only thing you can try to change here would be replacing the double quotes with single quotes:

Sum({$< = {'Internal', 'Store'}, [Plant] -= {'Test'}>}[ABC]) / Sum({$< = {'Internal', 'Store'}, [Plant] -= {'Test'}>}[ABC])


I am assuming that X, ABC are all dummy, so when you replace them with the actual do make sure to check for upper case and lower case as everything in here will be case sensitive.


Best,

Sunny

maxgro
MVP
MVP

what's the meaning of your last expression; it seems the result should be 1?

Sum ({$< = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])

/

Sum ({$< = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])