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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
maniram23
Creator II
Creator II

set analysis

Hi Experts,

i am trying monthname function in set analysis.

this is my if condition expression,

Count( DISTINCT IF([SER_Work Type] = 'Accidental Repair', if(MonthName([SER_R/O Date]) = max(TOTAL MonthName([SER_R/O Date])), ROLIST.CENRO))).

=count(if(Left([Part No],3)='VAS',ROLIST.CENRO))


can you please help me.

6 Replies
sdmech81
Specialist
Specialist

Hi,

Please elaborate without writing expression as it looks wrong!

Or try to put something like :

var=(MonthName(max(Date)))

=count({<[OM_Org] = {'Accidental Repair'} MonthName(Date) = var>}CountryName)

If u want distinct put before CountryName.

Please try with above set or give more clarity.

Sachin

sdmech81
Specialist
Specialist

Replace variables with yours.Thanks

sunny_talwar

Where in your expression are you using set analysis? Can you share the expression?

arulsettu
Master III
Master III

may be try this

in script MonthName(Date) as Month

or Month(Date) as Month

count({<[OM_Org] = {'Accidental Repair'}, Month={$(=Max(Month))}>}CountryName)

jonathandienst
Partner - Champion III
Partner - Champion III

The LHS* of a set expression needs to be a field name, not a calculated value. So you may need to add these derived fields

MonthName([SER_R/O Date]) as MnDate ,

Left([Part No],3) as PartType,


Then you can use the derived fields in set expressions.

Count({<[SER_Work Type] = {'Accidental Repair'}, MnDate = {"=$(MonthYear(Max(MnDate)))"}>} DISTINCT ROLIST.CENRO).

* left hand side

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

And

=Count({<PartType = {'VAS'}>}  ROLIST.CENRO)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein