Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Moss
Contributor
Contributor

Ignore a Dimension

Hi, 

I'm sorry for my approximate English.

I use a set analysis to calculate how many sales each seller made, and also how many sales in the shops.

seller_name Count({[Date de vente]=p(Date),item_type_name={'tasse'},detail_id )
Alfred 12
Robbyn 17

 

Those to sellers works in the same shop "FRINGS"

shop_name Count({[Date de vente]=p(Date),item_type_name={'tasse'},detail_id )
FRINGS 29
ENARGE 45

in a pivot table or table, I want to assign to the seller all the sales of the shop, ignoring the dimension "seller_name" in the line of the seller_name

Like this when i choose the shop : FRINGS

seller_name  
Alfred 29
Robbyn 29

 

I have the dimension "shop_name" for the shops et and "seller_name" for the seller

Thank you 

Labels (2)
1 Solution

Accepted Solutions
Angela_Zhou
Contributor III
Contributor III

@Moss 

First, I don't believe your count formula post here works since the Set Expression seems missing closing ">}" .

If your working count formula looks like below,
    Count({<[Date de vente]=p(Date),item_type_name={'tasse'}>} detail_id)

Then, you can try:
if(GetCurrentSelections([shop_name])>0
,  //adding RED highlight to your working formula
   Count(Total distinct {<[seller_name]=,[Date de vente]=p(Date),item_type_name={'tasse'}>} detail_id)

,  //you original count formula
   Count({<[Date de vente]=p(Date),item_type_name={'tasse'}>} detail_id)
)

Above solution is based on my understanding of your requirement of in two cases, 
1) If any selection of shop_name, use all shop sale count for each seller in this shop
2) If no shop selected, mark seller true sale count  

 

Angela Z.

View solution in original post

3 Replies
Angela_Zhou
Contributor III
Contributor III

@Moss 

First, I don't believe your count formula post here works since the Set Expression seems missing closing ">}" .

If your working count formula looks like below,
    Count({<[Date de vente]=p(Date),item_type_name={'tasse'}>} detail_id)

Then, you can try:
if(GetCurrentSelections([shop_name])>0
,  //adding RED highlight to your working formula
   Count(Total distinct {<[seller_name]=,[Date de vente]=p(Date),item_type_name={'tasse'}>} detail_id)

,  //you original count formula
   Count({<[Date de vente]=p(Date),item_type_name={'tasse'}>} detail_id)
)

Above solution is based on my understanding of your requirement of in two cases, 
1) If any selection of shop_name, use all shop sale count for each seller in this shop
2) If no shop selected, mark seller true sale count  

 

Angela Z.
Moss
Contributor
Contributor
Author

Thank you , it works.

Moss
Contributor
Contributor
Author

Hi, I have a new problem now.

i've tried with one shop it's ok, but when i select more than one i have the same result for all the shops.