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

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

Formula not working on report

Hi Guys,

i created a dynamic table that is build based on the dimension/measure selected.

Everything is working except the margin which is easy to be calculated ( SALES - COST ) / SALES

=SUM((ExtendedUSD - ExtendedCostUSDADJ)/(ExtendedUSD))

as you can see below the margin is 1,119 which is wrong, should it be 0,50 (50%)

.

FORMULA WRONG.PNG

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni
MVP
MVP

Check this? and enable the % from number format

=Num((SUM(ExtendedUSD) - Sum(ExtendedCostUSDADJ))/Sum(TOTAL ExtendedUSD),'#,##0%')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
hari8088
Creator
Creator

Try like this.

(SUM((ExtendedUSD) - sum(ExtendedCostUSDADJ))/sum(ExtendedUSD))


after this in chart properties number tab change to percentage for this expression

qlikviewaf
Creator
Creator
Author

not working

errrrrrrr.PNG

mdmukramali
Specialist III
Specialist III

Dear,

use the below expression:

=(SUM(ExtendedUSD) - sum(ExtendedCostUSDADJ)) / sum(ExtendedUSD)


=(Sum(SUM(ExtendedUSD) - sum(ExtendedCostUSDADJ))/sum(ExtendedUSD))

Anil_Babu_Samineni
MVP
MVP

Check this? and enable the % from number format

=Num((SUM(ExtendedUSD) - Sum(ExtendedCostUSDADJ))/Sum(TOTAL ExtendedUSD),'#,##0%')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hari8088
Creator
Creator

Don't give two sum in starting

(SUM((ExtendedUSD) - sum(ExtendedCostUSDADJ))/sum(ExtendedUSD))