Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Display Total Minutes

I have a table that has the following expressions: Seconds and Minutes[( Seconds/60)]

I am struggling with:

- I only want to display Seconds for each month and calculate Total Seconds and only display  calculated Total Minutes next  Total Seconds as per below attachment:

  

1 Solution

Accepted Solutions
ben_pugh
Creator
Creator

Dimensionality() refers to the vertical dimensions (columns) of the table.

For a pivot table that is displaying totals by both row and column, you also need to use SecondaryDimensionality(), which refers to the horizontal dimensions (rows) of the table.

So basically we are saying for anything that is in either the totals row or the totals column, calculate seconds/60, otherwise seconds.

I've done this for you in the attached file. The formula is:

=if(Dimensionality()=0 or SecondaryDimensionality()=0,sum(Seconds)/60,sum(Seconds))

View solution in original post

14 Replies
Anil_Babu_Samineni

Usually we can create using interval function or simply date function to resolve. But, your image is very low sresolution.

Best Anil, 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
Anonymous
Not applicable
Author

Thank you for your response Anil Babu, I hope you can see the image better now. Would you kindly show me how to do this interval/date function?

ben_pugh
Creator
Creator

It's difficult to tell what you want from that image, but if you're looking for a way to calculate whole minutes (e.g. 90 seconds is 1.5 minutes but 1 whole minute) then you should use the DIV function. It's also worth looking at MOD for getting the remainder.

Div - script and chart function ‒ QlikView

Mod - script and chart function ‒ QlikView

Anonymous
Not applicable
Author

Hi Ben,

I have been trying to reattach the image but with no success.  I need to create an Expression for Total Minutes but when I do so it is duplicated across all the columns(months) but all I need is just the Total at the end as per attachment

Anonymous
Not applicable
Author

Hi Ben, I  have been trying to reattach the image but with no success.  I need to create an Expression for Total Minutes ( I have Months : May to July an within those months I have Rev Class TB1 to TB3 - These Rev Classes are in Seconds. So I want to convert these in to minutes which is (value/60). Now my problem is that if I do so the Total Minutes expression is duplicated across all months and all I need is Total of all these months as Total Minute at the end).

Anil_Babu_Samineni

Now i am clear about your needed. You need to add extra static names can be extended.

Best Anil, 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
ben_pugh
Creator
Creator

You can use Dimensionality(). The value Dimensionality()=0 refers to the totals row.

So in your expression, instead of =sum(Seconds), you can use:

=if(dimensionality()=0,sum(Seconds)/60,sum(Seconds))

This will convert seconds to minutes for the totals row only, and leave everything else as seconds.

Anonymous
Not applicable
Author

Hi Ben,

This works but I have multiple columns still with blanks. Do you mind showing me an example?

Regards,

Motshabi

ben_pugh
Creator
Creator

Hi Motshabi, example below.

You will also need to tick the box 'show partial sums' under the 'presentation' tab of the table.

qv1.jpg