Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate Contribution in straight table?

Hello,

Can any one tell me how to calculate contribution in straight table.

  

RegionMar-12 SaleContribution %
Total2,403
E1,31254.6
U73030.4
SA2199.1
AF210.9
AUS602.5
LAT502.1
ASIA110.9
MIDDLE EAST00.0

Here, i am using following expression for calculating Mar-12 sale

(SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)

Thanks.....

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try:

(SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)

/

(SUM(TOTAL {$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try:

(SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)

/

(SUM(TOTAL {$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)


talk is cheap, supply exceeds demand
vikasmahajan

You can also create Variable  vSAL

vSAL =  (SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)

Contribution Column

((SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},[PostDate]=">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Post Date]))"}>}[G_Amount]))

/100000)/vSAL)*100

HTH

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Thank you so much Gysbert & Vikas sir  for the solution .....