Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

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

Tags (1)
12 Replies
MVP
MVP

Re: Sum of Distinct

Create a chart with dimension MAR and as expression

=sum(vTAT)

Or post your expected result..

Re: Sum of Distinct

Hi

or you can try

=sum(DISTINCT vTAT)

Regards,
Prashant Sangle
Not applicable

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

buzzy996
Honored Contributor II

Re: Sum of Distinct

se tis,

tat:

Load * INLINE [

MAR,vTAT

123454,1:23

123454,1:23

123456,4:15

1234566,5:17

];

tat2:

nOCONCATENATE Load MAR,

SUM(vTAT) AS vTAT

resident tat

group by MAR;

Drop table tat;

Not applicable

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, 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))

Not applicable

Re: Sum of Distinct

Hi

Yes vTAT is a Variable

Not applicable

Re: Sum of Distinct

Hi

Below is the sample data

   

   

DateMAR         vTAT
2015-04-24150424SCBLAU2SAXXX44958660321:13:41
2015-04-24150424SCBLAU2SBXXX012300400263:41:27
2015-04-24150424SCBLAU2SAXXX449586603365:52:23
2015-04-24150424SCBLAU2SBXXX012300400263:41:27
2015-04-24150424SCBLAU2SBXXX0123004002

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.

Community Browser