Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bushpalaamarnat
Creator
Creator

Skew calculation

Hi All, could you please help with what is the best way to write the formula for calculating skewness.

Following is the formula used to calculate the skew of s data set

Capture.JPG

=Count(DISTINCT {<Inventory_Position = {'OOS'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

Count(DISTINCT {<Inventory_Position = {'Low Stock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

Count(DISTINCT {<Inventory_Position = {'Intolerance'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

Count(DISTINCT {<Inventory_Position = {'Overstock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

Count(DISTINCT {<Inventory_Position = {'NoDemand'}>} Week&Material&[Supplier Loc]&[Customer Loc])

Skewness formula as follows:

=Skew(DISTINCT {<Inventory_Position = {‘OOS'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

Skew(DISTINCT {<Inventory_Position = {'Low Stock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

skew(DISTINCT {<Inventory_Position = {'Intolerance'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

skew(DISTINCT {<Inventory_Position = {'Overstock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+

Skew(DISTINCT {<Inventory_Position = {'NoDemand'}>} Week&Material&[Supplier Loc]&[Customer Loc])

1 Solution

Accepted Solutions
sunny_talwar

Not entirely sure what you are needing, but may be this

=Skew(TOTAL Aggr(

Count(DISTINCT {<Inventory_Position = {'OOS'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Low Stock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Intolerance'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Overstock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'NoDemand'}>} Week&Material&[Supplier Loc]&[Customer Loc])

, Inventory_Position))

View solution in original post

7 Replies
avkeep01
Partner - Specialist
Partner - Specialist

Hi,

You can make your expressions a lot simpler if you write them like this:

Count(DISTINCT {<Inventory_Position = {"OOS","Low Stock","Intolerance","Overstock","NoDemand"}>} Week&Material&[Supplier Loc]&[Customer Loc])

And then calculate the skew over your aggregated counts.

SKEW (AGGR(Count(DISTINCT {<Inventory_Position = {"OOS","Low Stock","Intolerance","Overstock","NoDemand"}>} Week&Material&[Supplier Loc]&[Customer Loc]),Inventory_Position))

sunny_talwar

Not entirely sure what you are needing, but may be this

=Skew(TOTAL Aggr(

Count(DISTINCT {<Inventory_Position = {'OOS'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Low Stock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Intolerance'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Overstock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'NoDemand'}>} Week&Material&[Supplier Loc]&[Customer Loc])

, Inventory_Position))

bushpalaamarnat
Creator
Creator
Author

Hi Sunny,

Your formula actually worked. Thank you for the information.

I am trying to get average\ skewness of inventory_positions

sunny_talwar

I am trying to get average\ skewness of inventory_positions

It worked? and you still trying to get average\skewness? You mean you also need average? may be this

=Average(TOTAL Aggr(

Count(DISTINCT {<Inventory_Position = {'OOS'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Low Stock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Intolerance'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'Overstock'}>} Week&Material&[Supplier Loc]&[Customer Loc])

+Count(DISTINCT {<Inventory_Position = {'NoDemand'}>} Week&Material&[Supplier Loc]&[Customer Loc])

, Inventory_Position))

bushpalaamarnat
Creator
Creator
Author

Thank you Sunny! it worked.

sunny_talwar

You marked your own response as correct ... did you want to mark one of my responses as correct?

bushpalaamarnat
Creator
Creator
Author

Hi Sunny, you got that correct. i have close this skew thing today. then go home.

sorry if it was lots of work for you.