Forum Discussion
Incorrect Totals
- 3 years ago
Hi Gekko1 ,
If your goal is to calculate the amount of products that each company have in the last date of the selected month, please try following steps:
This is my test table:
Create a new column:
Month = FORMAT([Date],"mmmm")Try following measure:
Measure = CALCULATE( SUM('Table'[Amount]), FILTER('Table','Table'[Month] = SELECTEDVALUE('Table'[Month]) && 'Table'[Company ID] = SELECTEDVALUE('Table'[Company ID]) && 'Table'[Date] = MAX('Table'[Date])) )Is this the result you want?
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Gekko1 ,
If your goal is to calculate the amount of products that each company have in the last date of the selected month, please try following steps:
This is my test table:
Create a new column:
Month = FORMAT([Date],"mmmm")
Try following measure:
Measure = CALCULATE(
SUM('Table'[Amount]),
FILTER('Table','Table'[Month] = SELECTEDVALUE('Table'[Month]) &&
'Table'[Company ID] = SELECTEDVALUE('Table'[Company ID]) &&
'Table'[Date] = MAX('Table'[Date]))
)
Is this the result you want?
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.