Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rangam_s
Creator II
Creator II

How to Calculate Contribution % of Inventory cover

Hi,

Currently, I am calculating the Inventory cover like below:

Now, I need to calculate the Inventory cover contribution.

((Sum({$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Production Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Blocked Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock in Transit])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock at Quality])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Total Valuated Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Unrestricted Stock]))

/

RangeAvg(sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate))$(=Date(vMaxSalesDate-6))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-7))>=$(=Date(vMaxSalesDate-13))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-14))>=$(=Date(vMaxSalesDate-20))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-21))>=$(=Date(vMaxSalesDate-28))"},[Sales Volume]={">=0"}>}[Sales Volume])))*6.5

Can you please let me know if have any solutions for this.

Required Table:

    

Product GroupProduct CodeInventory Cover in days%
A1611.32%
A259.43%
A347.55%
B459.43%
B5611.32%
C6611.32%
D71018.87%
E81120.75%

% = Inventory Cover in Days/ Total Inventory Cover in days

1 Solution

Accepted Solutions
rangam_s
Creator II
Creator II
Author

(((Sum({$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Production Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Blocked Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock in Transit])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock at Quality])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Total Valuated Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Unrestricted Stock]))

/

RangeAvg(sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate))$(=Date(vMaxSalesDate-6))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-7))>=$(=Date(vMaxSalesDate-13))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-14))>=$(=Date(vMaxSalesDate-20))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-21))>=$(=Date(vMaxSalesDate-28))"},[Sales Volume]={">=0"}>}[Sales Volume])))*6.5)

/

Sum(Total RangeSum(Aggr(

((Sum({$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Production Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Blocked Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock in Transit])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock at Quality])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Total Valuated Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Unrestricted Stock]))

/

RangeAvg(sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate))$(=Date(vMaxSalesDate-6))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-7))>=$(=Date(vMaxSalesDate-13))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-14))>=$(=Date(vMaxSalesDate-20))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-21))>=$(=Date(vMaxSalesDate-28))"},[Sales Volume]={">=0"}>}[Sales Volume])))*6.5,[Product Code])))

View solution in original post

5 Replies
fabdulazeez
Partner - Creator III
Partner - Creator III

Use Total qualifier to get Total inventory cover (perform an aggregation across all dimensions)

rangam_s
Creator II
Creator II
Author

Can you please give me an expression for this.

Thanks for your helping hand.

balabhaskarqlik

It could be like this:

Sum({$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])

/

Sum(TOTAL {$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])

Add your remaining expressions into this.

rangam_s
Creator II
Creator II
Author

Thanks for your help.

I got the answer.

rangam_s
Creator II
Creator II
Author

(((Sum({$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Production Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Blocked Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock in Transit])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock at Quality])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Total Valuated Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Unrestricted Stock]))

/

RangeAvg(sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate))$(=Date(vMaxSalesDate-6))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-7))>=$(=Date(vMaxSalesDate-13))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-14))>=$(=Date(vMaxSalesDate-20))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-21))>=$(=Date(vMaxSalesDate-28))"},[Sales Volume]={">=0"}>}[Sales Volume])))*6.5)

/

Sum(Total RangeSum(Aggr(

((Sum({$<[Transaction Date]={"$(vMaxDepotDate)"}>}[Depot Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Production Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Blocked Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock in Transit])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Stock at Quality])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Total Valuated Stock])+

Sum({$<[Transaction Date]={"$(vMaxProductionDate)"}>}[Unrestricted Stock]))

/

RangeAvg(sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate))$(=Date(vMaxSalesDate-6))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-7))>=$(=Date(vMaxSalesDate-13))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-14))>=$(=Date(vMaxSalesDate-20))"},[Sales Volume]={">=0"}>}[Sales Volume]),

sum({$<[Transaction Date]={"<=$(=Date(vMaxSalesDate-21))>=$(=Date(vMaxSalesDate-28))"},[Sales Volume]={">=0"}>}[Sales Volume])))*6.5,[Product Code])))