Forum Discussion
Need help on calculation
- 7 years ago
Hi Anonymous ,
Actually, we can use SUM() or MAX() or other Aggregate function in this scenario, in "message[date] =" the = operator can only accept a scalar rather than a column "'Table'[date]", as a result, we need to use a Aggregate function to change the column to a value.
But don't be worried about this, actually, in this scenario, only one value in the column "'Table'[date]" becuase it has been filtered by the table visual, as a result, SUM(), MIN(), MAX() can get the same result.
Best Regards,
Teige
Hi Anonymous ,
In your scenario, we can first create a table with the date:
Table = VALUES(message[date])
Then create a measure like below:
Measure = COUNT(user[user]) - CALCULATE(DISTINCTCOUNT(message[user]),FILTER(ALL(message),message[date] = MIN('Table'[date])))The result will like below:
Best Regards,
Teige
thanks for reply.....TeigeGao in the Measure expression, . why did u use 'MIN('Table'[date]'... im not able to undertsand
- TeigeGao7 years agoSolution Sage
Hi Anonymous ,
Actually, we can use SUM() or MAX() or other Aggregate function in this scenario, in "message[date] =" the = operator can only accept a scalar rather than a column "'Table'[date]", as a result, we need to use a Aggregate function to change the column to a value.
But don't be worried about this, actually, in this scenario, only one value in the column "'Table'[date]" becuase it has been filtered by the table visual, as a result, SUM(), MIN(), MAX() can get the same result.
Best Regards,
Teige
- Anonymous7 years agoNot applicable
TeigeGao thx for the explanation