Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sagarrahul
Creator
Creator

dividing single value with total

hii good morning need a help

this is my table

         

HOSPITAL_NAMEHOSPITAL_CODECLM_XGEN_CLAIM_NUMCLM_INTIMATION_DATEClm_TypeICD_CODE_LEVEL1_orgtotal count of claimsICD Code BlacklistValue
ADITYA HOSPITALSHEGIC-HS-23852RR-HS15-1033537201-Feb-2016REIMBURSMENTR50.9110.1000
ADITYA HOSPITALSHEGIC-HS-23852RR-HS15-1033537201-Feb-2016REIMBURSMENT-100.1000
ADITYA HOSPITALSHEGIC-HS-23852RR-HS15-1033608305-Feb-2016REIMBURSMENTS42.0110.1000
ADITYA HOSPITALSHEGIC-HS-23852RR-HS15-1033608305-Feb-2016REIMBURSMENT-100.1000
ADITYA HOSPITALSHEGIC-HS-23852RR-HS15-1033865322-Feb-2016REIMBURSMENTN39.0110.1000
ADITYA HOSPITALSHEGIC-HS-23852RR-HS15-1033865322-Feb-2016REIMBURSMENT-100.1000
ADITYA HOSPITALSTotal



330.3000


i want to divide ( individual ICD_CODE_LEVEL1_org /total count of claims )

eg :

R50.9/3

means 1/3=0.3333

i am getting a problem its dividing whole column as u can see i have mark it in yellow colour

so can any one help me in this !!!!!!

17 Replies
sagarrahul
Creator
Creator
Author

its not working

will give u table

    

HOSPITAL_NAMEHOSPITAL_CODECLM_XGEN_CLAIM_NUMCLM_INTIMATION_DATE
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS15-1034224615-Mar-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS15-1034224615-Mar-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS15-1034224815-Mar-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS15-1034224815-Mar-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS15-1034224915-Mar-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS15-1034224915-Mar-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034662112-Apr-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034662112-Apr-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034780420-Apr-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034780420-Apr-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982103-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982103-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982503-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982503-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982703-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982703-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982803-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESHEGIC-NN-14636RR-HS16-1034982803-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCESTotal

     

Clm_TypeICD_CODE_LEVEL1_orgtotal count of claimsICD Code BlacklistValue
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000
REIMBURSMENTN18.5110.111
REIMBURSMENT-100.000
REIMBURSMENTC08.0110.111
REIMBURSMENT-100.000
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000
REIMBURSMENTC91.0110.111
REIMBURSMENT-100.000


990.333

C91.0 is repeated 7 times so it should go 7/9 and the ans but is divinding 1/9

Anonymous
Not applicable

Hi sagar,

You are not counting distinct.

If you want divide by total, write TOTAL on your Expression.

If you wanna count distinct values, write DISTINCT on your expression.

sagarrahul
Creator
Creator
Author

see i my table both are coming

in one hos[ital repeated data is coming but in another its not coming

now how to handle it 

this is my table below 

HOSPITAL_NAMEHOSPITAL_CODECLM_XGEN_CLAIM_NUMCLM_INTIMATION_DATE
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-57847RR-HS16-1035631110-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-67133RR-HS16-1035470401-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-67133RR-HS16-1035470401-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-67133RR-HS16-1035470701-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-67133RR-HS16-1035470701-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-67133RR-HS16-1035471301-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCEHEGIC-NN-67133RR-HS16-1035471301-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCETotal

ALL INDIA INSTITUTE OF MEDICAL SCIENCE..HEGIC-NN-58922RR-HS15-1033119605-Jan-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCE..HEGIC-NN-58922RR-HS15-1033119605-Jan-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCE..HEGIC-NN-58922RR-HS15-1033119605-Jan-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCE..HEGIC-NN-58922RR-HS16-1034982403-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCE..HEGIC-NN-58922RR-HS16-1034982403-May-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCE..HEGIC-NN-58922RR-HS16-1035656813-Jun-2016
ALL INDIA INSTITUTE OF MEDICAL SCIENCE..Total

    

Clm_TypeICD_CODE_LEVEL1_orgtotal count of claimsICD Code Blacklist
REIMBURSMENT-10
REIMBURSMENTC91.011
REIMBURSMENT-10
REIMBURSMENTC91.011
REIMBURSMENT-10
REIMBURSMENTC91.011
REIMBURSMENT-10


43
REIMBURSMENTK74.611
REIMBURSMENTK92.211
REIMBURSMENT-10
REIMBURSMENTC91.011
REIMBURSMENT-10
REIMBURSMENT-10


33
Anonymous
Not applicable

Hi sagar,

Count(TOTAL <HOSPITAL_CODE> DISTINCT ICD_CODE_LEVEL1_org) for total distinct by hospital

Regards!

sagarrahul
Creator
Creator
Author

but there are too many hospital and codes given to it

then what to do 

Anonymous
Not applicable

On Total, you can indicate for which groups you want to calculate totals, you only need to specify the group.

This expression will calculate all distinct ICD_CODE_LEVEL1_org for each Hospital.

Regards!

sagarrahul
Creator
Creator
Author

not getting can u give eg manuel

Anonymous
Not applicable

Hi Sagar,

From QV Help:

Examples of Aggregate Qualifiers

These examples are made with the sum([{set_expression}][distinct][total[<fld {, fld}>]] expression) function, but may be applied on all chart aggregation functions supporting Set Analysis definitions and the total qualifier.

Example 1:

Study the representation of a straight table below, depicting the logical state before any selections have been made:

The second and third expression column have the same number in all rows. This number equals the calculated total in the first expression column.

Now, let's select months 1 and 2 only. The result is as follows:

The result of the third expression (fifth column) remains unchanged because the set definition disregards current selections. The second expression (fourth column) with the total qualifier, shows the new total 10, which is still equivalent to the first expression total (third column).

Example 2:

Study the representation of a straight table below:

In the third expression column (sum(total<Month> Val)) one total is calculated for each month.

In the fourth expression column (sum(total<Grp> Val)) one total is calculated for each group.

Regards!