Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Creator II
Creator II

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
Partner

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
Partner

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