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: 
zturaiki
Contributor III
Contributor III

dimenssion in chart

i have this table in the database Bill_Table:

The column in the table is as followiing

Payment Type                   Gross Amount            Discount Amount        Amount Patient Payable

 

The Value in the column Payment Type is : Insurance / Cash / Aramco / GOSI

I will create chart to calculate the net amount per payment type

Net amount = sum(Gross amount – discount amount – amount patient payable)

But for the insurance I have to calculate the amount twice :

Insurance = sum(Gross amount – discount amount – amount patient payable)

And

Co-Insurance = sum(amount patient payable)

So in the chart , the dimension will be the Payment type:

Insurance / Co-Insurance / Cash / Aramco / GOSI

The problem that I cannot get the Co-insurance separate from the Insurance …

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use expressions for every payment type. See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Not applicable

Pls give the sample data for this.

~kabilan K

Not applicable

Dear Zain Ahmed.

can you provide a sample file so that we can help you.

Thanks,

Mukram.

jagan
Partner - Champion III
Partner - Champion III

HI,

How you differentiate Co Insurance and Insurance, is there any logic for that?

 

Please try below expression

If(PaymentType = 'Insurance', sum(Gross amount – discount amount – amount patient payable),

    

If(PaymentType = 'CoInsurance',  sum(amount patient payable),

    
sum(Gross amount – discount amount – amount patient payable)))

Regards,

Jagan.

zturaiki
Contributor III
Contributor III
Author

Co-Insurance = Sum(amount patient payable)

Insurance = sum(gross amount - discount amount - amount patient payable )

in aother words:

Insurance = sum(gross amount - discount amount -Co-Insurance  )

the co-insurance is partial from the insurance

zturaiki
Contributor III
Contributor III
Author

Attached is example of the data

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use expressions for every payment type. See attached qvw


talk is cheap, supply exceeds demand
zturaiki
Contributor III
Contributor III
Author

Thank you Mr.Gysbert Wassenaar

its work know ,,, good solution

just i make a little change , i took the expression like this

 

sum({<[Payment Type]={'INSURANCE'}>}[Amount Patient Payable])

without the dual ...

question : what is the use of function dual ?

Thank you ..

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You're right that the dual function isn't necessary here. I was first trying another approach and forgot to remove the dual again. What it does is create a value with both a textual and a numeric representation. That way you can use the numeric value to calculate with and use the text value for presentation.


talk is cheap, supply exceeds demand