Forum Discussion
Anonymous
1 year agoNot applicable
3 Connected Tables and adding a measure
Hi, I have 3 tables that are connected. (One is from a SQL database and two from an excel file. Here is the graph its showing. I am trying to add a measure that takes the differenc...
- 1 year ago
Hi Anonymous ,
Thank you for reaching out to Microsoft Community.
COUNTA and SUM operate in different table contexts, this results in an incorrect aggregation when used in visuals like matrices. Try this DAX measure:
Difference in Total to Budgeted =
VAR Staffcount = CALCULATE(COUNTA('HR table'[Full Name]))
VAR Budgeted = CALCULATE(SUM('dir or ind'[Budget]))
RETURN
Staffcount - Budgeted
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Chaithra E.
Anonymous
1 year agoNot applicable
Here is the measure I used
Difference in Total to Budgeted = COUNTA('HR table'[Full Name])-(SUM('dir or ind'[Budget]))