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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Jérôme5625
Creator
Creator

Syntax for set analysis

Hello,
quick question, do you have any idea about the syntax error in my analysis set?
I can't find my error on this line.
Thank you in advance.

=count({<if_statut_equip_={'OK'}+<if_statut_equip_={'OK_SDM'},[date.autoCalendar.Date]={">=$(=MonthStart(max([date.autoCalendar.Date]),-12))"}*{"<=$(=MonthEnd([date.autoCalendar.Date]))"}>} distinct (equipement))/Count({<service_responsable=,[date.autoCalendar.Date]={">=$(=MonthStart(max([date.autoCalendar.Date]),-12))"}*{"<=$(=MonthEnd([date.autoCalendar.Date]))"}>} total distinct([equipement]))

 

Labels (1)
1 Reply
marcus_sommer
MVP
MVP

I think your applied operators between the various set-parts are causing the error respectively unwanted results:

count({<if_statut_equip_={'OK'}+<if_statut_equip_={'OK_SDM'},[date.autoCalendar.Date]={">=$(=MonthStart(max([date.autoCalendar.Date]),-12))"}*{"<=$(=MonthEnd([date.autoCalendar.Date]))"}>} distinct (equipement))

Instead of the above try it with:

count({<if_statut_equip_={'OK', 'OK_SDM'},[date.autoCalendar.Date]={">=$(=MonthStart(max([date.autoCalendar.Date]),-12))<=$(=MonthEnd([date.autoCalendar.Date]))"}>} distinct (equipement))