Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
alex59800
Contributor II
Contributor II

Help with Syntax in a Set analysis

Hi there,

I am quite a beginner in set analysis syntax so i would need your help:

I have two dimensions in my datamart i want to use specificly in a set analysis expression to format my table:

-Distribution networks going from 01 to 22 (text format)

-Analytics families going from 98510 to 98599 (numeric format)

I already use ONLY(YEAR) and ONLY(YEAR)-1 to make appear variable time following month and day selections in terms of turnover.

With distribution networks and analytics families in dimension, my first expression column is:

FIRST COLUMN to traduce turnover for ANALYTICS >98518 and <98527 in distribution networks 01 and 07 (it's working maybe there is more simple expression ...???):

=sum({<YEAR={$(=ONLY(YEAR)-1)} [ANALYTICS] = {'< 98518'} [ANALYTICS]={'07'} >} [SALES]) + sum({<YEAR={$(=ONLY(YEAR)-1)} [ANALYTICS] = {'< 98518'} [ANALYTICS]={'01'} >} [SALES])+
sum({<YEAR={$(=ONLY(YEAR)-1)} [ANALYTICS] = {'> 98527'} [ANALYTICS]={'07'} >} [SALES]) + sum({<YEAR={$(=ONLY(YEAR)-1)} [ANALYTICS] = {'> 98527'} [ANALYTICS]={'01'} >} [SALES])

SECOND COLUMN to traduce turnover for ANALYTICS <98518 in distribution networks different from 01 and 07 (I NEED HELP on that)

THIRD COLUMN to traduce turnover for ANALYTICS from 98518 included to 98521 included whatever the distribution network is. (I NEED HELP on that)

FOURTH COLUMN to traduce turnover for ANALYTICS from 98522 included to 98527 included whatever the distribution network is. (I NEED HELP on that)

thanks guys

0 Replies