Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

cbaqirdhds
Valued Contributor

Conditional Dimension

I have a dimension called DOMAIN. There are two possibilities, ECISA and CAREB.

If the dimension called DESCRIPTION and the LAST_REVIEWED_DATE are the same, I want the DOMAIN to show as A/B instead of one line for ECISA and one line for CAREB. 

For example: DESCRIPTION = NICU (Neonatal) Admission

2019-04-01_13-20-48.jpg

If the dimension called DESCRIPTION and the LAST_REVIEWED_DATE are NOT the same, I want the DOMAIN on one line for ECISA and one line for CAREB. 

For example, DESCRIPTION = Heparin Infusion for ACS/Vascular (Xa)2019-04-01_13-20-03.jpg

Can someone please help me?

Labels (1)
1 Solution

Accepted Solutions

Re: Conditional Dimension

Try this

=Aggr(If(Count(TOTAL <DESCRIPTION> DOMAIN)>1 and Count(DISTINCT TOTAL <DESCRIPTION> LAST_REVIEW_DATE) = 1,'A/B',DOMAIN), DESCRIPTION, DOMAIN)
5 Replies

Re: Conditional Dimension

Perhaps this?

sum(aggr(Sum({$<DOMAIN = {'A'}>}USAGE),DOMAIN,GOVERNING_CCG,DESCRIPTION,LAST_REVIEW_DATE))/sum(aggr(Sum({$<DOMAIN = {'B'}>}USAGE),DOMAIN,GOVERNING_CCG,DESCRIPTION,LAST_REVIEW_DATE))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
cbaqirdhds
Valued Contributor

Re: Conditional Dimension

I am not sure why there is "/" nor the sum function. Can you help me understand?
cbaqirdhds
Valued Contributor

Re: Conditional Dimension

@sunny_talwar Any idea?

Re: Conditional Dimension

Try this

=Aggr(If(Count(TOTAL <DESCRIPTION> DOMAIN)>1 and Count(DISTINCT TOTAL <DESCRIPTION> LAST_REVIEW_DATE) = 1,'A/B',DOMAIN), DESCRIPTION, DOMAIN)
cbaqirdhds
Valued Contributor

Re: Conditional Dimension

OMG THANK YOU!!!