Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Here's my data:
Employee | Call Type | Phone Number |
John | Work | 07100 123456 |
John | Personal | 07100 123456 |
John | Work | 07999 654321 |
Sarah | Work | 07123 456789 |
Sarah | Work | 07456 567890 |
Sarah | Personal | 07000 787878 |
John | Work | 07100 123456 |
The end result will look like this:
So what I'm trying to calculate is:
show me the phone number that has been used for both work and personal calls (and only these numbers)
I tried something like this as the measure function in a bar chart count(call type = 'work'>0 AND call type = 'Personal'>0) - obviously this doesn't work - please can someone provide a formula to do this??
thanks,
Pokes
Working
COUNT({<[Phone Number]={"=COUNT(DISTINCT([Call Type]))=2"}>}[Phone Number])
Count({<PhoneNumber = {"=Count(DISTINCT CallType)=2"}>} PhoneNumber)
Hi Pokes,
you could use kind of additional flag field like "_work" and "_personal".
Then you can evaluate: if( _work * _personal, Phone Number)
Cheers
Damian
Hi Stefan,
Would you mind explaining this please, what does the 2 in the formula represent? Is it a phone number that matches both phone call types?
many thanks,
Pokes
Thanks Damian, I'll try this at work tomorrow
cheers,
Pokes
This part in the expression is called Set Analysis:
{<PhoneNumber = {"=Count(DISTINCT CallType)=2"}>}
It's basically filtering your PhoneNumber by using an expression search:
Only include the number in the set to aggregate where the distinct count of CallType values is 2, i.e. both Work and Private calls have been made (assuming that these are the only existing types).
Ok, i got it. Many thanks - I'l try this at work tomorrow too.
Cheers,
Pokes
Hi Pokes,
I think, Stefans solution is the best fit for your needs.
Have a wonderful day!
Damian
Hi Stefan,
Tried your formula at work today, unfortunately it gave an 'error in expression' warning. Any ideas??
cheers,
Pokes
Hi Pokes,
can you paste your formula to show the syntax?
Thanks
Damian