KnifeandFork
New Member
- Joined
- Jan 9, 2014
- Messages
- 5
Hi all!
I'm desperately trying to get PowerPivot to count the number of 'L's in a column. L itself is a measure, which returns 'L' for stores which have not bought in over a year (and are therefore Lost) and blank for all other cases. When I try the following function:
=calculate(DISTINCTCOUNT([Store]),[Lost]="L")
I get the following error:
Calculation error in measure 'Table1 1'[98cc8508-821c-4611-9777-c96938814971]: A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
The original source file is structured as follows, so I cannot do it directly in the file, as Quarters are in rows and not columns:
<tbody>
</tbody>
Any ideas?
Thanks!
I'm desperately trying to get PowerPivot to count the number of 'L's in a column. L itself is a measure, which returns 'L' for stores which have not bought in over a year (and are therefore Lost) and blank for all other cases. When I try the following function:
=calculate(DISTINCTCOUNT([Store]),[Lost]="L")
I get the following error:
Calculation error in measure 'Table1 1'[98cc8508-821c-4611-9777-c96938814971]: A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
The original source file is structured as follows, so I cannot do it directly in the file, as Quarters are in rows and not columns:
Country | Store | Brand | Quarter | Sales |
Armenia | a | X | Q1 | 10 |
Armenia | b | Y | Q1 | 20 |
Armenia | c | Y | Q1 | 27 |
Armenia | a | Y | Q1 | 74 |
Armenia | c | X | Q1 | 206 |
Armenia | a | X | Q2 | 60 |
Armenia | b | Y | Q2 | 215 |
Armenia | c | X | Q2 | 191 |
Armenia | d | Y | Q2 | 197 |
Armenia | e | Z | Q2 | 189 |
<tbody>
</tbody>
Any ideas?
Thanks!