Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shaybitton
Partner - Contributor III
Partner - Contributor III

Calculated dimension by conditional aggregation

Hi there,

I have 3 measures ,Year1 ,Year2 ,Year3

I have 2 dimensions Channel and Agent.

i want to create a calculated dimension combining the Channel Dimension in the logic below

if   Year1>10 or Year1 <-10 or Year2>10 or Year2 <-10 Year2>10 or Year2 <-10


(True Section)

Then check if (Match(Organization,'1','2','3'),Channel,'Building')


(False Section)

if (Match(Organization,'1','2','3'),ADJ,'Building')




Simplifying it:

Organization = 1,2,3  represent Paint Organization


if the 3 measures are greater than 10 or less than -10


check if the line(including the Agent dim) associates to Paint, if so use Channel dim If not associate it to 'Building'


if the line doesn't meet the  condition

check if the line(including the Agent dim) associates to Paint, if so use ADJ, If not associate it to 'Building'.


Thank you for your help,

Shay

1 Reply
PrashantSangle

instead of dimension try it in expression window..

if(

     Year1>10 or Year1 <-10 or Year2>10 or Year2 <-10 Year2>10 or Year2 <-10,

          if(Match(Organization,'1','2','3'),Distinct Channel,'Building'),

          if (Match(Organization,'1','2','3'),Distinct ADJ,'Building')

)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂