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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tax calculation

Hi All,

Please let me to know how to calculate Inclusive and exclusive tax in dimension filters

example

Filters should be Y or N

If user clicks Y then it has to calculate A+B

if User Clicks N then it has to calculate A+ c

we have value for A+B and A+C

Thanks in advance

Labels (1)
4 Replies
its_anandrjs
Champion III
Champion III

Hi,

In the expression write this expression

=IF( GetFieldSelections(Filters) = 'Y', Sum(A)+Sum(B),Sum(A)+Sum(C))

Filters is a field here with values Y and N

Regards,

Anand

Anonymous
Not applicable
Author

Hi,

Try:

=sum(if(FieldName = 'Y' ,A+B,A+C))

or


=sum(if(GetFieldSelections(FieldName) = 'Y' ,A+B,A+C))

Regards

Neetha

Anonymous
Not applicable
Author

Hi,

thks for the reply..

I need to show in list box...

y  ---- A+B

N ---- A+c

Thks in advance

its_anandrjs
Champion III
Champion III

Hi,

Try this way then

T1:

LOAD * Inline [

Filters,A,B,C

Y,34,56,23

N,45,45,45

Y,7,56,24

N,65,34,53

Y,54,45,45

Y,45,67,43

];

tmp:

LOAD

Filters,

'Y' as Flag,

IF(Filters = 'Y', Sum(A)+Sum(B)) as CommonSum

Resident T1

Group By

Filters;

LOAD

Filters,

'N' as Flag,

IF(Filters = 'N', Sum(A)+Sum(C)) as CommonSum

Resident T1

Group By

Filters;

Final:

LOAD

Filters,Flag,

Flag&'----'&CommonSum as XY_Common

Resident tmp

Where not IsNull(CommonSum);

DROP Table tmp;

And you get list box as

Commonop.PNG

Regards

Anand