Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table

Hi

I have made a table which returns a -1 or 0 depending on whether the criteria set in the expression have been met. The expression is

(Today()-Eligibility Data>730 AND (Today()-FIT_Meter Date)>730 OR (Today()-Eligibility Date)>730 AND IsNull(Meter Data).

It provides a list of all the IDs and whether they meet the expression test or not, along with which company they are registered with.

E.g.

Header 1Header 2Header 3Header 4Header 6
IDCompanyEligibility DataMeter DateCriteria Met
A1A07/04/201012/09/20130
A2B07/04/201012/09/20130
A3C07/04/2010-1
A4A07/04/2010-1
A5B07/04/201012/09/20130
A6C07/04/201001/04/20111
A7A07/04/201012/09/20130

I have tried to make a pivot table which has a row for each company and the number of IDs which meet the criteria and the number that don't

e.g.

Header 1Header 2Header 3
CompanyMetNot Met
A21
B02
C20

Is there a way to do this?

Any help would be appreciated.

Thanks,

iain

2 Replies
Not applicable
Author

There could be many way to achieve this,

a pivot table example is attached.

pivot_qv.qvw

Not applicable
Author

Thanks for that.

It works, but is not set up in the same way as your table. It has the company on the left then 'Met' and 'Not Met' in rows beside it rather than separate columns.

Also I have a problem with the way the data I have is where each installation owned by a company has two or more meters associated with it which results in the totals being more than doubled. I usually do a set analysis to only count one meter type to resolve this but it does not seem possible in this example.

Any help would be appreciated.