Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Calculating percentage area wise

i want to calculate the are wise percentage

=num( (sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Area={'Dubai'} ,TransactionType={'I'}>}#sales)

-

sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Area={'Dubai'},TransactionType={'C'}>}#sales))

/

(sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},TransactionType={'I'}>}TOTAL #sales)

-

sum( {<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},TransactionType={'C'}>}TOTAL  #sales)),'0%')

its working fine but when i click the area dubai its show the 100% but my dubai sales is 54%

how can i change the expressions?

1 Reply
pokassov
Specialist
Specialist

Hi!

Could you try this:

=num( (sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Area={'Dubai'} ,TransactionType={'I'}>}#sales)

-

sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Area={'Dubai'},TransactionType={'C'}>}#sales))

/

(sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Area=,TransactionType={'I'}>}TOTAL #sales)

-

sum( {<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Area=, TransactionType={'C'}>}TOTAL  #sales)),'0%')