Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression total error in getting delta

Expense

$192,577

($163,772)

Here ($163,772) is _ve value and when I give expression total in a straight table I get $356,349 which is wrong.I have to get the delta of  28,805.How can I achieve that ?

Thanks much

1 Solution

Accepted Solutions
sunny_talwar

Try 'Sum of Rows' as total mode. If that doesn't work still, would you be able to share a sample?

View solution in original post

5 Replies
sunny_talwar

Try 'Sum of Rows' as total mode. If that doesn't work still, would you be able to share a sample?

amayuresh
Creator III
Creator III

Can you post sample data ?

Because it work for me in normal scenario,

Script:

LOAD * INLINE [

    Category, Item, Supplier, Data

    Cat1, Item11, Sup2, 100

    Cat1, Item11, Sup3, -150

    Cat1, Item12, Sup1, 200

    Cat1, Item12, Sup2, 1

    Cat1, Item12, Sup3, 1

    Cat1, Item12, Sup4, 1

    Cat2, Item21, Sup2, 1

    Cat2, Item21, Sup3, 1

    Cat2, Item21, Sup4, 1

    Cat3, Item31, Sup1, 1

    Cat3, Item31, Sup2, 1

    Cat3, Item31, Sup3, 1

    Cat3, Item31, Sup4, 1

    Cat3, Item32, Sup1, 1

    Cat3, Item32, Sup4, 1

];

Output:

1.PNG

tyagishaila
Specialist
Specialist

share sample data...

how you consider ($163,772) as -ve.

if your

Expense

$192,577

-$163,772

than you will definitely get  correct total/Sum.

avinashelite

Try like this

if(wildmatch(Expense,'(*)')>0,purgechar(Expense,'()')*-1,Expense)

Anonymous
Not applicable
Author

Once export your chart to excel and check .share your sample data