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

Show total row wise in pivot table

I have a pivot table which shows the count of test cases and I'm showing it horizontally.

Capture.JPG

(image from an excel export)

I want to show the percentage row wise. Instead, it is calculating the percentage column-wise.

For example, in CR4701 US130543 there are 12 test cases and all of them are in Pass state. So the pass percentage should be 100%. Instead, it is calculating the percentage by taking all the 'Pass' test cases i.e. 195 [(12/195)*100]. It should calculate only for that particular CR.

Is there any way to do that? I hope I have made my requirement clear.

Expression for count:

count(TestCaseID)

Expression for Percentage:

count(TestCaseID)/count(total(TestCaseID))

(I think for the % expression, the denominator is wrong.)

Thanks,

YASH

10 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

count(TestCaseID)/count(total<TestCaseCRs>(TestCaseID))


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
yashcena
Contributor III
Contributor III
Author

Hi Kaushik....this expression did not work.

balabhaskarqlik

May be these:

Count(TestCaseID)/Count(total <DIM1> TestCaseID)

or

Count(TestCaseID)/Count(total <DIM1, DIM2> TestCaseID)

or

if(dimensionality()=0, Count(TestCaseID)/Count(total <DimA> TestCaseID), sum(TestCaseID)) // (Think so)

Kushal_Chawda

Would you be able to share the sample file?

yashcena
Contributor III
Contributor III
Author

I'm not able to find the option to attach .qvw. Drag and drop also didnt work

yashcena
Contributor III
Contributor III
Author

Hi Bala..i tried this expression but it didnt work. Kaushik had already asked me to try it.

thanks..

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

See the attached app.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar