Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Issue with Sum Duration in Nprinting (Report type : Pixcel Perfect)
I have a field of working duration in Qlik Sense Application.
I was able to show the duration per shift when I formatted my duration in Text (Ex. Working hours : 11:14:00) in the application.
Now I have my duration in text for group details, and I want to apply a Sum of duration for each employee !
Sum(11:14:00 + 00:01:00 +00:15:00) = 12:00:00 (12 hours)
My problem : how I can convert Text(hh:mm:ss) to Numeric value Num(hh:mm:ss) and sum all duration in footer report in order to show the Sum with hh:mm:ss format !
Interesting question and so far i was not able to find satisfying me solution. I found few workarounds where i would calculate group total as a different object in Qlik but was not able to use Summary ->Group ->Sum and format result as duration.
My scenario:
- using QlikView
- Created a field called "Duration"which has values between 0 -1 and used it in expression Sum(Duration). this field can be considered as a time/duration.
- Created a table in QlikView with Dim1 and Dim 2 as dimensions and Sum(Duration) as expression
- Brought in the above table as level to PixelPerfect template
- I built detailed report of this level and in Detail band added all fields
- i am able to format those fields in NPrinting pixel perfect to any number/percentage format and I am also able to create group footer or header with sum(Duration) column used as data member and apply summary --> Group --> Sum function to calculate total
- if i try to apply time duration formatting on it neither format work nor summation in total.
I believe this is the way DevExpress library is designed to deal with data as it expects Time-Span for duration formatting --> https://www.devexpress.com/Support/Center/Question/Details/T583334/time-format-xtrareport where from Qlik it receives number.
@Ruggero_Piccoli - what would be your recommendation?
Hi,
Could you send me your example? I would like to investigate.
I suppose the only way could be to write a script to calculate and format a custom total.
Best Regards,
Ruggero
I created a measure in Qlik Sense which represent a Sum(Duration) as number (decimal),
Now I want to have example, how to format this decimal number as duration in a script (I suppose with C#) !, for this Pixcel Perfect report.
Assumed that I have 3 durations with their decimal values. I made a sum of these values in a footer ===> Ok
But I want to format this Sum (convert decimal to duration) in a footer of this group !
Ex : Sum(NumericDuration) = 0,84375 ===> Format as hh:mm:ss :[20:15:00]
How I can reference this object in a C# Script, for what event (befor print ! or other event !)
My granular value in a detail section is named : label28
And My sum in a footer section, is named label29
I don't know how to reference them in this environnement (C# of Pixcel Perfect 3 Report Designer) !!!
It is another environment (C# Report Designer) which I ignore how it works !!!
😞
PrintScreen (Example)
Hi,
@QSMACHBI @Lech_Miszkiewicz give a check at this new article https://community.qlik.com/t5/Qlik-NPrinting-Documents/Summarize-Time-Columns-in-PixelPerfect-Report...
Best Regards,
Ruggero