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: 
Not applicable

How to write expression in Set Analysis


Hi,

I have to show in line chart curent month employess and the dimension is Day of Month.

Can anyone help me how to write with set analysis as when i am using one dimesion as Month and other dimension as Day and expressions as Count(Distinct(EmployeeID) it is not showing correct values. please help.

Thanks.

4 Replies
Not applicable
Author

If you have Dimensions:

- Month

- Day

And Expression: =count(distinct EmployeeID)

You can change your expression into: =count( TOTAL <Month> Distinct EmployeeID)

This will allow your expression to skip being filtered by all the chart dimensions but Month.

jagan
Partner - Champion III
Partner - Champion III

HI,

Try like this

Dimension : Day(DateDimension)

Expression : Count({<Day=, Week=, DateDimension={'>=$(=MonthStart(Max(DateDimension)))<=$(=Max(DateDimension))'}>} EmployeeID)

Hope this helps you.

Regadrs,

Jagan.

Not applicable
Author

Thanks and you mean DateDimension means Date and if I want to have MonthSort also as dimension means how can I write?

jagan
Partner - Champion III
Partner - Champion III

Hi,

Yes, replace DateDimension with your date field and MonthStart is a function.  Can you attach some sample data?

Regards,

Jagan.