Forum Discussion
Total is wrong when categorised is vendor wise
- 7 months ago
santoshlearner2 Please check which MonthDate-field are you using in the report.
One common mistake is to have a DateDimTable, but use the Date-field from a transaction table.
Best practice: Use the DateDimTable Field at the report
Alternate solution if you are using the Table1[Month] field at the report:Sales Amount MTD := VAR LastVisibleDate = MAX ( 'Table1'[Month] ) VAR CurrentYear = YEAR ( LastVisibleDate ) VAR CurrentMonth = MONTH ( LastVisibleDate ) VAR SetOfDatesMTD = FILTER ( ALL ( 'Table1'[Month] ), 'Table1'[Month] <= LastVisibleDate && YEAR ( 'Table1'[Month] ) = CurrentYear && MONTH ( 'Table1'[Month] ) = CurrentMonth ) VAR Result = CALCULATE ( SUM ( Table1[Sales] ), SetOfDatesYTD, KEEPFILTERS ( 'table 1'[Vendor code] ) ) RETURN Result
If this response was helpful in any way,
I’d gladly accept a kudo.
Please mark it as the correct solution.
It helps other community members find their way faster. - 7 months ago
Hi,
Thanks for everyone for assisting. I truly appreciate, But the response is not working. I cannot upload any file due to restrictions. Closing this, Thanks for every one.
Hi @santoshlearner2,
Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists please share the PBIX file to help further.
Best regards,
Prasanna Kumar
Hi,
Thanks for everyone for assisting. I truly appreciate, But the response is not working. I cannot upload any file due to restrictions. Closing this, Thanks for every one.