12 Replies Latest reply: Jun 8, 2015 9:08 AM by Senthil Kumar

Sum of Distinct

Hi

I have a variable named as vTAT

I have to find the sum of vTAT based on DISTINCT MAR

MAR                vTAT

123454                 1:23

123454                  1:23

123456                 4:15

1234566                 5:17

Regards

Senthil

• Re: Sum of Distinct

Create a chart with dimension MAR and as expression

=sum(vTAT)

• Re: Sum of Distinct

Hi

or you can try

=sum(DISTINCT vTAT)

• Re: Sum of Distinct

Hi

I want to show it in a BAR Chart with Dimension as Date , Expression as Avg of vTAT of DISTINCT MAR

• Re: Sum of Distinct

Hi

I want to show it in a BAR Chart with Dimension as Date , Expression as Avg of vTAT of DISTINCT MAR

Regards

Senthil

• Re: Sum of Distinct

se tis,

tat:

MAR,vTAT

123454,1:23

123454,1:23

123456,4:15

1234566,5:17

];

tat2:

SUM(vTAT) AS vTAT

resident tat

group by MAR;

Drop table tat;

• Re: Sum of Distinct

Hi, vTat is a variable? and what's the expression of the variable? Maybe this works if vTAT has the same value for the same MAR:

Avg(Aggr(vTAT, MAR))

• Re: Sum of Distinct

Hi

Yes vTAT is a Variable

• Re: Sum of Distinct

Hi

Below is the sample data

 Date MAR vTAT 2015-04-24 150424SCBLAU2SAXXX4495866032 1:13:41 2015-04-24 150424SCBLAU2SBXXX0123004002 63:41:27 2015-04-24 150424SCBLAU2SAXXX4495866033 65:52:23 2015-04-24 150424SCBLAU2SBXXX0123004002 63:41:27 2015-04-24 150424SCBLAU2SBXXX0123004002 63:41:27

Need to find the average of vTAT for DISTINCT MAR using Date as Dimension

Average should be around 43:35:50

Regards

• Re: Sum of Distinct

Hi, using "Avg(Aggr(vTAT, MAR))" returns 43:35:50, PFA.

• Re: Sum of Distinct

Attachment Missing

• Re: Sum of Distinct

I see the "Test.qvw" in the previous post, anyway, I upload it again.

• Re: Sum of Distinct

Hi

Below is my Requirement

Dimension - > Date

Need to find the average of Time Diff between EndDate and Start Date for Distinct MAR

In the Attached file the average should be 45:35:50

Note: Source file attached as excel in Distinct Sum

Regards,

Senthil