Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

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: 
mgdotcom
Contributor III
Contributor III

Sum for entire month

I hope someone can help. I need to calculate a sum of target for the entire month selected.

This is my load of the target table

Targets:

LOAD targetID,

     clientID,

     super_categoryID,

     ext_campaignname,

     target,

     Date(workingday,'YYYY/MM/DD')as Date

And my calendar

Calendar:

LOAD Date(Date,'YYYY/MM/DD') as Date,

8 Replies
Anil_Babu_Samineni

Not sure, I followed you. can you explain little in clear

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mgdotcom
Contributor III
Contributor III
Author

Sorry. So target is a numerical value.

I'm currently doing this is a chart to calculate the daily target based on a selection of year, month and date.

Sum(Aggr(Sum(target),clientID,super_categoryID))

What I would like to do is do a calculation for the entire month. So it shows a monthly Target.

Anil_Babu_Samineni

Like this?

Sum(Aggr(Sum(TOTAL <Month> target),clientID,super_categoryID))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
its_anandrjs

Do you have Month field in your Calendar table if not add this ways

Targets:

LOAD

    targetID,

     clientID,

     super_categoryID,

     ext_campaignname,

     target,

     Date(workingday,'YYYY/MM/DD')as Date

Calendar:

LOAD Date(Date,'YYYY/MM/DD') as Date,

Month(Date,'YYYY/MM/DD') as Month


And on UI part


Dim:- Month (And selected Month)

Expre:- =Sum(target)




mgdotcom
Contributor III
Contributor III
Author

Snip20171206_1.png

This is what i get when I use Sum(Aggr(Sum(TOTAL<Month> target),clientID,super_categoryID))

Anil_Babu_Samineni

Have you considering Month as fieldName?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mgdotcom
Contributor III
Contributor III
Author

I have a month field in  calendar. Would i need one in target also?

Anil_Babu_Samineni

Would you mine, Can you provide sample data set and result set?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)