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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alignment in Expression

Hello,

In a pivot table, I have the following expression which results in calculated values for "Tot" and "%NStd" screen pasted below.

=if(columnno()=0, num(round(sum(total <ASSIGNED_TEAM,UW,REPORTING_PERIOD> CNT)),'#,##0')

&'          '&

num(round(sum({<REPORTING_PERIOD={'Non-Std'}>}CNT))/round(sum(total <ASSIGNED_TEAM,UW,REPORTING_PERIOD> CNT)),'#,##0%'),num(round(sum(CNT)),'#,##0'))

As you can see, the alignment for the values under "Tot" goes awry with the varying results under "%NStd".

What can I put in my expression so that the values under "Tot" are all always right aligned no matter the results under "%NStd"?

Thank you.PivotTableResults.PNG

12 Replies
chaper
Creator III
Creator III

I think 10% looks fine except 100% right ?

Not applicable
Author

Some of the 10% looks good and some don't depending on the rounding.

In any case, I think I will close this out and see if I ass for assistance to split the two columns.  The formatting thing doesn't seem to be working out as the best solution.

chaper
Creator III
Creator III

Try this now. Almost there it handles everything including 100% issue also

=if(columnno()=0,

(num(round(sum(total <TEAM,CustomerName,REPORTING_PERIOD> CNT)),'#,##0'))

&'          '& if(round(sum({<REPORTING_PERIOD={'Non-Std'}>}CNT))/round(sum(total <TEAM,CustomerName,REPORTING_PERIOD> CNT))<0.1,num(round(sum({<REPORTING_PERIOD={'Non-Std'}>}CNT))/round(sum(total <TEAM,CustomerName,REPORTING_PERIOD> CNT)),'#,##0    %'),

                   if(round(sum({<REPORTING_PERIOD={'Non-Std'}>}CNT))/round(sum(total <TEAM,CustomerName,REPORTING_PERIOD> CNT))=1,num(round(sum({<REPORTING_PERIOD={'Non-Std'}>}CNT))/round(sum(total <TEAM,CustomerName,REPORTING_PERIOD> CNT)),'#,##0%'),

                   num(round(sum({<REPORTING_PERIOD={'Non-Std'}>}CNT))/round(sum(total <TEAM,CustomerName,REPORTING_PERIOD> CNT)),'#,##0  %')))

,num(round(sum(CNT)),'#,##0'))

Capture.PNG