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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help regarding calcalated measures

Hi ,

I have one calculated meaure (Avg TAT) for that we are using definition , and the final result will be in Hours ,

(((Sum(TOT_INTR_MIN*60)+sum(PPS_anr_tat_hrs__c*3600))/count(distinct(if(UPPER(Status)='CLOSED' or 'COMPLETED',Case_Number,1))))/3600)

TOT_INTR_MIN--> values are there in Minutes(so converted into Sec.)

PPS_anr_tat_hrs__c--> values are there in Hours (so converted into Sec.)

while using that definition not getting exact value(please look at below highlighted values in the table)

VAEC88.38
KOREA43.57
SWEDEN8,125.59
DENMARK7,722.90
ISAREL7,205.16
BELGIUM6,730.11
FINLAND6,404.13
SPAIN6,397.94
FRANCE6,038.79
SWITZERLAND5,916.24

Can any one help me here ?

Thanks & regards,

Sh

Labels (1)
6 Replies
abeyphilip
Creator II
Creator II

Hi Shobha,

Please share what you are expecting for the highlighted values.

A test model / data would help others to look into this.

Regards,

Abey

Not applicable
Author

Not sure about why you consider those values not exact, but you seem to have one error in the expression:

(((Sum(TOT_INTR_MIN*60)+sum(PPS_anr_tat_hrs__c*3600))/count(distinct(if(UPPER(Status)='CLOSED' or 'COMPLETED',Case_Number,1))))/3600)

Should be:

(((Sum(TOT_INTR_MIN*60)+sum(PPS_anr_tat_hrs__c*3600))/count(distinct(if(UPPER(Status)='CLOSED' or UPPER(Status)='COMPLETED',Case_Number,1))))/3600)

suniljain
Master
Master

Can you share application with dummy data ?

Not applicable
Author

Hi ,

Thanks for the reply ,

my expected value is

SPAIN6,397.94--->6,398.34
FRANCE6,038.79---->6,039.19

values shoud be in hours ..

Thanks & Regards,

Sh

Not applicable
Author

Ok, understood, but I think you are focusing wrong the data you want.

SPAIN6,397.94
FRANCE6,038.79

This is not wrong, you just have to represent it as an interval in every graph you want, and it will show up as a an hour data. Just pick the 'interval' representation option in the 'number' tab of your graph, and, as it will expect day related expression, just div the expression with a 24:

hour/24

this will work and your graph will show:

SPAIN 6,397:56 h

abeyphilip
Creator II
Creator II

Hi Shobha,

The conversion of  6,397.94 to 6,398.34 may not be correct.

You have used a mathematical calculation of division by 3600. There is no time calculation here.

In this way, ".100" will be 1 hour.

".94" you can consider it as 94% of an hour, as IOSO has pointed out this comes to 56 minutes and not 1 Hour.

Similarly, 5916.24 for Switzerland is not 5916 hours and 24 minutes, but 5916 hours and 15 minutes.

So you already seems to have the right value.

regards,

Abey