Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count?

Hi Community,

The below screen shot is my input,

I need the output as below,

I have tried with some expressions, but I could not succeed.

Can some one help me with this.

Thanks in Advance.

6 Replies
avinashelite

Could you please explain the LOGIC how your getting that output ?? so that we can help you

HirisH_V7
Master
Master

Hi,

Can you please tell whats that count(on) and count (off) .

Table:

LOAD

Week(Date) as Week,

WeekStart(Date) as WeekStart,

WeekEnd(Date) as WeekEnd,

WeekDay(Date) as WeekDay,

* INLINE [

    Date

    5/1/2015

   10/1/2015

    14/1/2015

    15/1/2015

    26/1/2015

    29/1/2015

    3/2/2015

    7/2/2015

    11/2/2015

];

Hope this helps for knowing week flow.

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data:

LOAD

Date AS ActualDate,

Date(MakeWeekDate(Year(Today(), OnWeekNumber), 'DD-MMM') AS Date,

1 AS OnCount

FROM DataSource;

Concatenate(Data)

Data:

LOAD

Date AS ActualDate,

Date(MakeWeekDate(Year(Today(), OffWeekNumber), 'DD-MMM') AS Date,

1 AS OffCount

FROM DataSource;

Now in chart try like below

Dimension: Date

Expression 1: Count of On

=Sum(OnCount)


Expression 1: Count of Off

=Sum(OffCount)

Hope this helps you.

Regards,

jagan.

raajaswin
Creator III
Creator III

I Think this is it.

Check the appasw.PNG

Not applicable
Author

As 5th jan 2015 falls on week 2, 'count of on' should count only 2 in column 'on',

similarly 'count of off' should count 2 in the column 'off'. Here as there is no 2 in off column, the result will be zero(0).

Thanks

Not applicable
Author

Yes that is the one. But if Iam trying the same by importing the data through excel, I could not get the exact output.