Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr Calculations

Hi All

I have a task at hand...

I have fields [Preparer] [Reviewer 1] [Reviewer 2] [Reviewer 3] .

I need to write a calculation that will show me all "prepered" documents that was reviewed more than once by the same Reviewer and the amount of times it was reviewed by that person.

How can I do this?

1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Partner - Master II

you need to use CrossTable so that you the Reviewers are under one column Reviewer

Crosstable (Reviewer) load * resident your_table

this way you'll have a table like this

Preparer    Reviwer

1               Reviwer1

1               Reviwer2

1               Reviwer1

....

then in your expression you'll need to write something like

count({<Reviewer={"=count(Reviwer)>1"}>}Preparer)

I can walk on water when it freezes

View solution in original post

9 Replies
MK_QSL
MVP
MVP

Can you provide some sample data please?

Not applicable
Author

Also there's a field for [Documents]. These are what is prepeared and reviewed.

So overall there's [Documents] [Preparer] [Reviewer 1] [Reviewer 2] [Reviewer 3]. Hope that will help

MK_QSL
MVP
MVP

Difficult to work without any sample data...

jagan
Luminary Alumni
Luminary Alumni

Hi,

It is difficult to come up with solution without some sample data.  So attach some sample records and your expected output, this way you will get the solution easily and quickly. 

Regards,

Jagan.

Not applicable
Author

Sorry guys...how do I attach a document in my reply?

I can't seem to find a button that lets you attach documents.

ali_hijazi
Partner - Master II
Partner - Master II

you need to use CrossTable so that you the Reviewers are under one column Reviewer

Crosstable (Reviewer) load * resident your_table

this way you'll have a table like this

Preparer    Reviwer

1               Reviwer1

1               Reviwer2

1               Reviwer1

....

then in your expression you'll need to write something like

count({<Reviewer={"=count(Reviwer)>1"}>}Preparer)

I can walk on water when it freezes
jagan
Luminary Alumni
Luminary Alumni

Hi,

Click on Use Advanced Editor button and upload the file using attach button.reply.png

Regards,

Jagan.

Not applicable
Author

Here is some sample data

DocumentPreparer nameReviewer 1Reviewer 2Reviewer 3
Obtain detailed listings and test
  accruals and other liabilities
Tumelo FaanSeanNone
Obtain detailed listings and test
  accruals and other liabilities
Tumelo FaanNoneNone
Obtain detailed listings and test
  accruals and other liabilities
Tumelo FaanNoneNone
Search for unrecorded liabilitiesJohnTshepoLindseyJames
*Evaluate potential impact of
  non-compliance with laws and regulations
davidThaboSarahNone
*Evaluate potential impact of
  non-compliance with laws and regulations
JohnThaboNoneNone
*Obtain evidence on material related
  party transactions
TebangLeboKeriJohny
*Respond to the risk of material
  misstatement due to fraud involving management override of controls
JustinJohnjamesNone
jagan
Luminary Alumni
Luminary Alumni

Hi,

First transform the data by using CrossTable

Crosstable (Reviewer, ReviewerName)

load * from your_table;


Now I need to write a calculation that will show me all "prepered" documents that was reviewed more than once by the same Reviewer and the amount of times it was reviewed by that person.


Chart : Straight Table

Dimension: Document, prepered, Reviewer

Expression: If(Count(Reviewer) >1, Count(Reviewer))


Hope this helps you.


Regards,

Jagan.