Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Is there a way to write an Expression to calculate the total from "report (1) column (3) with criteria (a) AND report (1) column (3) with criteria (b) "What I am trying to do is count the number of calls where lead source is "A" and call duration > 30 seconds AND where lead source is "B" and call duration > 15 Right now I can do the first part in one measure and the 2nd part in another, is there a way to count them in a single measure? Technically I want to count 3 in one so actually include lead source "C" and call duration >5
Solved! Go to Solution.
pls try this
Measure = countx(FILTER('Table','Table'[Source]="Referral"&&'Table'[Call Duration]>30 ||'Table'[Source]="Commercial"&& 'Table'[Call Duration]>15||'Table'[Source]="Advertisement"&&'Table'[Call Duration]>5),'Table'[Calls])
Proud to be a Super User!
could you pls proivde some sample data and expected output?
Proud to be a Super User!
Calls | Source | Call Duration | ||||||
555-555-5555 | Referral | 65 | ||||||
555-555-5555 | Referral | 20 | Count Where Source IN { "Referral'}, | |||||
555-555-5555 | Referral | 65 | Call Duration >30 | |||||
555-555-5555 | Referral | 13 | ||||||
555-555-5555 | Referral | 85 | 3 | |||||
111-111-1111 | Commercial | 82 | ||||||
111-111-1111 | Commercial | 61 | ||||||
111-111-1111 | Commercial | 28 | Count Where Source IN { "Commercial'}, | |||||
111-111-1111 | Commercial | 35 | Call Duration >15 | |||||
111-111-1111 | Commercial | 12 | ||||||
111-111-1111 | Commercial | 3 | ||||||
111-111-1111 | Commercial | 11 | 5 | |||||
111-111-1111 | Commercial | 82 | ||||||
999-999-9999 | Advertisement | 73 | ||||||
999-999-9999 | Advertisement | 2 | ||||||
999-999-9999 | Advertisement | 35 | Count Where Source IN { "Advertisement'}, | |||||
999-999-9999 | Advertisement | 1 | Call Duration >5 | |||||
999-999-9999 | Advertisement | 13 | ||||||
999-999-9999 | Advertisement | 4 | 3 | |||||
In This example I want a single returned value of 11 |
pls try this
Measure = countx(FILTER('Table','Table'[Source]="Referral"&&'Table'[Call Duration]>30 ||'Table'[Source]="Commercial"&& 'Table'[Call Duration]>15||'Table'[Source]="Advertisement"&&'Table'[Call Duration]>5),'Table'[Calls])
Proud to be a Super User!
Thank you that worked well. Obviously that was not the data I was working with but I was to get a single total of the data where each line was tested for 3 conditions to determine if counted and each condition verified data from 3 separate columns. I was considering returning to the table and adding a column and using IF statements then just adding from there., I appreciate the help.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
106 | |
87 | |
75 | |
66 |
User | Count |
---|---|
125 | |
114 | |
98 | |
81 | |
73 |