Here is my sample table (for this report I'm using only one table, so there is no table-relationship-links to contend with):
Cost Centre | Project | Invoice Approver |
---|---|---|
123 | AB | Person One |
123 | AB | Person Two |
123 | ZZ | Person One |
456 | TB | Person Three |
I have a measure already written Approver = COUNT('Table'[Invoice Approver])
. In the sample above, Approver = 4
.
I have created a new table showing only those combinations with 1 approver. The table shows 123|ZZ and 456|TB (NOTE: for this table, the approver(s) do not need to be shown, only the unique cost centre/project combinations).
My next step is to have a Card showing the net quantity of the filters: 2. But I need help in writing the DAX measure.
I have tried the following DAX formulae:
Code | Result |
---|---|
1InvApp = COUNTROWS(FILTER('Table',[Approver]="1")) |
"DAX comparison operations do not support comparing values of type Integer with values of type Text." |
1InvApp = COUNTROWS(FILTER('Table',[Approver]=1)) |
Blank (text) |
1InvApp = CALCULATE(COUNTROWS('Table'),[Approver]="1") |
"A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression." |
1InvApp = CALCULATE(COUNTROWS('Table'),[Approver]=1) |
"A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression." |
1InvApp = COUNTX('Table',[Approver]="1") |
"DAX comparison operations do not support comparing values of type Integer with values of type Text." |
1InvApp = COUNTX('Table',[Approver]=1) |
"The function COUNTX cannot work with values of type Boolean." |
1InvApp = COUNTAX(FILTER('Table',[Approver]=1),'Table'[Approver]) |
Blank (text) |
1InvApp = COUNTAX(FILTER('Table',[Approver]="1"),'Table'[Approver]) |
"DAX comparison operations do not support comparing values of type Integer with values of type Text." |
1InvApp = COUNTROWS(FILTER(ALL('Table'),[Approver]=1)) (as suggested here) |
Blank (text) |
QUESTION: What is the correct DAX syntax to show the desired total result, 2?
Thanks in advance.
[Approver] = 1
is my attempt to determine the quantity of invoice approvers for each combination of cost centre/project. the[Approver]
measure is taken fromCOUNT('Table'[Invoice Approver])
– Marc