Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
harjedalskok
Creator
Creator

Expression issue

!Hi

im trying to show a admin fee for our subcontrators,

Ive got the correct expression for showing with the dimension Order, meaning the expression calculate how much the subcontrator fee is per order.

if(fkMountingPricelistID = '12', (sum(orderpriceamount * '0.2') + '100'), (sum(orderpriceamount * '0.2') + '260'))

Then ive made another diagram table, where i want to use the dimension subcontrator, to show the total for each subcontrator.

ive tryed this, but i dont get the correct numbers.

if(fkMountingPricelistID = '12', (sum(UTmonteringspris*0.2) + (Count(OrderId*100))), (sum(UTmonteringspris*0.2) + (Count(OrderId*260))))

anyone that can point me in the right direction.

Thx alot in advance.


/André

6 Replies
Digvijay_Singh

Not sure though but try Sum(If.... instead of If(Sum..you are using currently.

avinashelite

Try like this:

if(fkMountingPricelistID = '12', (sum(UTmonteringspris)*0.2) + (Count(OrderId)*100), (sum(UTmonteringspris)*0.2) + (Count(OrderId)*260)

)

harjedalskok
Creator
Creator
Author

Thx for fast answer

When using above and I  make selection of ONE subcontrator i have now a dif of 320, dont get why.

avinashelite

can you please share your app

jonathandienst
Partner - Champion III
Partner - Champion III

This would be the syntactically correct version of your first statement:

=if(fkMountingPricelistID = 12, (sum(UTmonteringspris * 0.2) + 100), (sum(UTmonteringspris * 0.2) + 260))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
harjedalskok
Creator
Creator
Author

Sure,  ive upload the file.

Hope it can give u some idea, there are to table, the totals are not equal.

/André