Forum Discussion
mattyj2009
8 years agoHelper II
Subtotal Not Calculating Correctly
When doing a subtotal with measure customer counts we are getting an incorrect value. From the data it is showing we should have a subtotal of 4577 and what the actual subtotal is showing is 4554. ...
- 8 years ago
Hi mattyj2009
Create a calculated column
Column = CALCULATE(DISTINCTCOUNT(Sheet1[account]),FILTER(ALLEXCEPT(Sheet1,Sheet1[area]),[end]=0))
Create a measure
discount =
VAR filtered =
FILTER ( ALLEXCEPT ( Sheet1, Sheet1[area] ), [end] = 0 )
VAR countb =
CALCULATE ( DISTINCTCOUNT ( Sheet1[account] ), filtered )
RETURN
IF (
HASONEVALUE ( Sheet1[area] ),
countb,
SUMX ( VALUES ( Sheet1[Column] ), [Column] )
)Best Regards
Maggie
v-juanli-msft
8 years agoCommunity Support
Hi mattyj2009
Sorry to bother you, would you give some feedback if my solution works for you, if not, what's wrong with it, or is there anything else you need?
Best Regards
Maggie
mattyj2009
8 years agoHelper II
I was able to get it to work with the solution provided. Thanks!