Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
kdmarkee
Specialist
Specialist

Percentage of total column not working in pixel perfect report

I’ve have had success with this in the past and now cannot figure out why NP is not showing what I’ve built in my QlikView straight chart.  QV is correct but NP is not showing QV values.  For some reason NP is not acknowledging the TOTAL amounts correctxly to give me the correct percentages per row.   See screen shot below. I have tried using my set analysis code in my expressions and also tried using script variables (representing the set analysis code) in my expressions for both the denominator and numerator separately and then together as one expression as the percentage itself.

For example, I want to take the first value divided by the second to get my percentage so my column equals 100%:

Charges by group and payor is:  sum({$<FLAG={1}>}Charges)

Total Charges for a group is:  sum(TOTAL<[GROUP]>{$<FLAG={1}>}(Charges)

QV shows values correctly, NP does not...

100 pct issue pp.PNG

Labels (2)
10 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

It is because in pixel perfect you are likely using level which cycles through individual dimension values to populate table rows. In such scenarion for each row TOTAL is equal to value from that row hence 100% and hence TOTAL collected = collected.

Try using formulas like:

Total Charges for a group is:  sum(TOTAL<[GROUP]>{<somedimension=,FLAG={1}>}(Charges)

 

cheers Lech, 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 to the problem.
kdmarkee
Specialist
Specialist
Author

Thanks for the suggestion, but unfortunately that did not work.  Now my NP results is this:

In NP, the first dimension repeats and only the total coll fills in correctly.  QlikView show the correct info. 100 pct issue pp_2.PNG

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I will give it a try tomorrow and will get back to you with my findings

 

cheers

cheers Lech, 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 to the problem.
Ruggero_Piccoli
Support
Support

Hi,

You added the source table in the Levels node of a PixelPerfect template. So:

1- do a right click over that table and select "Add Calculated Field".

2 - do a right click over the new calculated field and select Edit Calculated Field

3 - insert an expression like  ([collected]/Sum([collected]))*100

4 - drag and drop the new calculated field into the template

Best Regards,

Ruggero

 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
kdmarkee
Specialist
Specialist
Author

I figured out the issue.  I have another report that is working and when I analyzed the difference between my 2 reports, I finally realized that when using my chart level, I have to use the fields from the Levels node instead of using the fields from the Tables node.  I wish I had a better understanding of when it is ok to use Table node fields vs Level node fields in a level in pixel perfect...

Ruggero_Piccoli
Support
Support

Hi,

Objects in the Tables node in PixelPerfect templates are used only as data source for native charts. It is a different use than objects in Tables node of other template types.

To create native PixelPerfect tables you must use Levels.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

@Ruggero_Piccoli ... and sparklines in tables, right? 😛

cheers Lech, 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 to the problem.
Ruggero_Piccoli
Support
Support

But sparklines are charts 🙂



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

yeah, what i meant is that they are  usually used inside (table) detailed report level, so they are not added using a chart asset pannel but sparkline panel...

nevermind - you are right 🙂

cheers Lech, 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 to the problem.