Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
Really confused over what to me should be a very simple calculation.
In my dataset I have three columns, Person ID, Date and Outcome. I have built a measure that counts all records -
Solved! Go to Solution.
Hi,
Try this
calculate(count('mytable'[Person ID]),FILTER('mytable','mytable'[Outcome]="Further Enquiries")) +0
This is how the sort of simple filter you have defined is supposed to work. This would effectively allow you to create ratio measures that compare "Further Enquiries" to other outcome types. However it is possible to make this work the way you want.
Effectively your measure:
calculate(count('mytable'[Person ID]),'mytable'[Outcome]="Further Enquiries")
Is short hand for the following:
calculate(count('mytable'[Person ID]),FILTER( ALL( 'mytable'[Outcome]), 'mytable'[Outcome]="Further Enquiries" ))
You can get the behaviour you require by using an expression like the following
calculate(count('mytable'[Person ID]),FILTER(VALUES('mytable'[Outcome]), 'mytable'[Outcome]="Further Enquiries" ))
Using VALUES() only returns outcomes in the current filter context. So if you pick anything other than "Further Enquiries" it will return 0.
Hi,
Try this
calculate(count('mytable'[Person ID]),FILTER('mytable','mytable'[Outcome]="Further Enquiries")) +0
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |