Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
priya945
Creator
Creator

Total wrt dates in pivot table

Hi All,

My data is as below 

Case NumberRegionClosed DateOpened Date
1234North30-08-201830-08-2018
1243North30-09-201830-09-2018
1245South31-10-201831-10-2018
1254South30-08-201830-08-2018
1123East30-09-201831-10-2018
1232West31-10-201831-10-2018

 

expected o/p as below where i need Total with respect to dates. please guide 

 TotalNorthSouthEastWest
 30-08-201830-09-201831-10-201830-08-201830-09-201831-10-201830-08-201830-09-201831-10-201830-08-201830-09-201831-10-201830-08-201830-09-201831-10-2018
count of case number222110101010001

 

Thanks In advance

Labels (1)
7 Replies
Anil_Babu_Samineni

For me this is straight forward, But output is not correct for me as per your needs. Can you share output of below data?

Case NumberRegionClosed DateOpened Date
1234North30-08-201830-08-2018
1243North30-09-201830-09-2018
1245South31-10-201831-10-2018

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
priya945
Creator
Creator
Author

Hi Anil,

Please find below expected output where i need count of case number for all Regions. Also Total (count of CaseNumber for all Regions) wrt to date

 Total
 30-08-201830-09-201831-10-2018
count of case number222
Kushal_Chawda

Just do below change in your Script

Use Date(Date#([Opened Date],'DD-MM-YYYY'),'M/D/YYYY')
instead of Date(Date#([Opened Date],'D-M-YYYY'),'M/D/YYYY') for both Dates

 

Now create Pivot table

Dimension:

'Count of case Number'

NDate

Expression:

Count(distinct [Case Number])

Drag NDate field to column in Pivot table

Also, check 'Suppress when value is NULL; option for NDate

and check 'Suppress zero value' from presentation tab 

priya945
Creator
Creator
Author

Hi Kush,

PFA for test data. 

 

 

issue is to get Total(sum of all regions) as below in qlikview respecting the dates

 Total
 30-08-201830-09-201831-10-2018
count of case number222

 

Thanks in advance

Kushal_Chawda

Just do below change in your Script

Use Date(Date#([Opened Date],'DD-MM-YYYY'),'M/D/YYYY')
instead of Date(Date#([Opened Date],'D-M-YYYY'),'M/D/YYYY') for both Dates

 

Now create Pivot table

Dimension:

'Count of case Number'

Region

NDate

Expression:

Count(distinct [Case Number])

Drag  Region & NDate field to column in Pivot table

Also, check 'Suppress when value is NULL; option for NDate

and check 'Suppress zero value' from presentation tab 

priya945
Creator
Creator
Author

Hi Kush,

Thanks for your reply but i am unable to get the desired o/p following your steps . Could please find attached qvw file where Total value needs to breakdown to date 

Thanks

Brett_Bleess
Former Employee
Former Employee

Priya, just going to leave a comment to pop this back up in the list to see if Kush or anyone else may have some ideas given you attached a QVW file.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.