Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
cedfoning
Creator
Creator

measure aggr qlik sense

Hello, i have a problem. 

i have sum of sales as measure, and lets say payment methods as dimension. 

Let's say i have the following data : 

Sales Payment method
1000 AMEX
25000000 CB

 

I would like a measure that will count the number of amex cards that have been used to get 1000 sales.

 

Thanks for your help. 

 

 

Labels (3)
1 Solution

Accepted Solutions
jochem_zw
Partner Ambassador
Partner Ambassador

so in that case the table is correct but the last measure should count the number of persons. that way you will report the payment method, the tot total sales, and the count of persons which used payment method 'A' etc.

View solution in original post

8 Replies
jochem_zw
Partner Ambassador
Partner Ambassador

Try this:

Count({$<Sales={1000},[Payment method]={'AMEX'}>}Payment method)

cedfoning
Creator
Creator
Author

Hello 
thanks for the reply. 

But, if i have 15 different payment methods. 

How can i have the number cards that have been used for each sum(sales) ? 

 

Thanks 

jochem_zw
Partner Ambassador
Partner Ambassador

Just create a table with Payment Method as the dimension

have 2 measures:

 sum(Sales)

Count([Payment Method])

 

sidhiq91
Specialist II
Specialist II

@cedfoning Could you please try the below code?

Count({<Payment_Menthod={'AMEX'}, Sales={">=1000"}>}Payment_Menthod)

Let me know if this resolves your issue.

 

cedfoning
Creator
Creator
Author

this is what i have. 

payment method sum(sales) count(payment method)
Totaux 139 456 620 26
A 61 231 733 1
B 52 881 658 1
C 14 773 987 1
D 5 100 747 1
E 3 290 429 1
E 1 236 871 1
F 941 194 1
jochem_zw
Partner Ambassador
Partner Ambassador

and what did you expect? sorry i don't know what you exactly want and what your source data is.

cedfoning
Creator
Creator
Author

What i want is : 

Let's say for the payment method A, i have sum(sales) = 61 231 733. 

i want to know how many A's generated that amount. 

im not sure that only one person with his A payment method paid for that amount. 

jochem_zw
Partner Ambassador
Partner Ambassador

so in that case the table is correct but the last measure should count the number of persons. that way you will report the payment method, the tot total sales, and the count of persons which used payment method 'A' etc.