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: 
jmialoundama
Specialist
Specialist

2 two set analysiss expression in one expression

Hi, 

Hello,
I have these two expressions.

The first expression allows me to calculate the "Notified closed" status of the previous 3 years:

=count({$<echeance_date_YYYY={"<$(=year(today()))"},[Notifié cloturée/Non cloturée]={"Notifié cloturée"}>}DISTINCT key_nb_poste_commande)

The second expression allows me to calculate the status "Notified not closed for the next 3 years" : 

=count({$<echeance_date_YYYY={">=$(=year(today()))"},[Notifié cloturée/Non cloturée]={"Notifié non cloturée"}>}DISTINCT key_nb_poste_commande)

I want to combine these 2 expressions in a single expression in order to have this result in my table:

jmialoundama_0-1653037372263.png

 

Thanks 🙂

 

Labels (1)
1 Solution

Accepted Solutions
vikasmahajan

you can use or condition in set analysis

=count({$<echeance_date_YYYY={"<$(=year(today()))"},[Notifié cloturée/Non cloturée]={"Notifié cloturée"}>}

+ <echeance_date_YYYY={"<$(=year(today()))"},[Notifié cloturée/Non cloturée]={"Notifié non cloturée"}>}
DISTINCT key_nb_poste_commande)

refer links:

https://community.qlik.com/t5/QlikView-App-Dev/quot-OR-quot-Condition-in-Set-Analysis/td-p/695709

https://community.qlik.com/t5/QlikView-App-Dev/AND-OR-combination-condition-in-set-analysis/td-p/786...

thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

1) Use a Pivot Table

 

2)  Add Both Measures

 

3) Add dimension "echeance_date_YYYY"  to the column section

 

4) Drag "Values" from Measure Section to Column Section (above Year)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vikasmahajan

you can use or condition in set analysis

=count({$<echeance_date_YYYY={"<$(=year(today()))"},[Notifié cloturée/Non cloturée]={"Notifié cloturée"}>}

+ <echeance_date_YYYY={"<$(=year(today()))"},[Notifié cloturée/Non cloturée]={"Notifié non cloturée"}>}
DISTINCT key_nb_poste_commande)

refer links:

https://community.qlik.com/t5/QlikView-App-Dev/quot-OR-quot-Condition-in-Set-Analysis/td-p/695709

https://community.qlik.com/t5/QlikView-App-Dev/AND-OR-combination-condition-in-set-analysis/td-p/786...

thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
jmialoundama
Specialist
Specialist
Author

Thanks you all for your help