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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Neo
Partner - Contributor
Partner - Contributor

Calculation based on dimension

Hi there,

I have multiple group segment each with designated stores. I want to calculate the percentage of store with sales for each group segment

e.g.

Corporate Segment has 10 store in total, 7 stores made sales in April so 70% strike rate

Now I want to present this in a chat showing only Group Segment and Strike rate for the month (Calculation is based on stores but I don’t want to show store in the table/dimension)

i.e.

Group Segment

Store

Strike

Strike Rate

Corporate

26

22

85%

Corporate Budget

27

23

85%

Hyper

20

18

90%

Mini Market

13

7

54%

Family

21

19

90%

Family Budget

22

21

95%

 

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You didn't show your raw data so I'll guess that having sales means the field Sales>0

Dimension:
Group Segment

Measures:
1. Count(Distinct StoreId)
2. Count({<Sales={">0"}>}Distinct StoreId)
3. Column(2) / Column(1)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You didn't show your raw data so I'll guess that having sales means the field Sales>0

Dimension:
Group Segment

Measures:
1. Count(Distinct StoreId)
2. Count({<Sales={">0"}>}Distinct StoreId)
3. Column(2) / Column(1)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

Neo
Partner - Contributor
Partner - Contributor
Author

thank you Rob works perfectly

How would I only count storeID where sales 2019 > sales 2018