Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Partner - Creator III
Partner - Creator III

Week day condition on working in if condition Qlik Sense

Hi,

I am trying to keep Month,Day& week in same chart with if condition.

Inline script:

Load * Inline

[

Charts

Day

Week

Month

];

Dimension:

If(wildmatch(Charts,'Month'),Month(dt),if(Wildmatch(Charts,'Week'),Weekday(dt),day(dt)))

Given Charts as filter, based on selection of filter dimension will work,

Issue is when selecting week is not showing weekday properly, its showing like jun,sun,mon(refer below image).

UserID2626_1-1592977696559.png

As per my requirement alternate dimension will not work properly. help me to resolve this weekday.

How to resolve.

Labels (3)
1 Solution

Accepted Solutions
shanemichelon
Partner - Creator II
Partner - Creator II

You need to wrap your dimension in an aggregate:

=aggr(
  If(wildmatch(Charts,'Month'),
     Month(dt),
     if(Wildmatch(Charts,'Week'),
       Weekday(dt),
       Day(dt)
       )
     ),
  dt
  )

 

View solution in original post

1 Reply
shanemichelon
Partner - Creator II
Partner - Creator II

You need to wrap your dimension in an aggregate:

=aggr(
  If(wildmatch(Charts,'Month'),
     Month(dt),
     if(Wildmatch(Charts,'Week'),
       Weekday(dt),
       Day(dt)
       )
     ),
  dt
  )