Forum Discussion
Month to Date Null Issue
Hi Yohua,
thank you very much for the try, But unfortunetly i'm still getting this, may be this is complicated becasue i've used slicers and all this is just a part of my dashboard, I'm seriously wondering why it shows correctly when i use it as total,
Hi, Ang007
I'm trying to re-understand your problem. So I recreated the simple example table:
Then create a new measure:
MTD sales Corporate =
VAR LatestDate = MAX('Lease Ledgers'[Lease Created On])
VAR currentMonthStart = DATE(YEAR(LatestDate), MONTH(LatestDate), 1)
VAR SalesAmount =
CALCULATE(
SUM('Lease Ledgers'[Fin Amt '000]),
FILTER(
'Lease Ledgers',
'Lease Ledgers'[Lease Created On] >= currentMonthStart &&
'Lease Ledgers'[Lease Created On] <= LatestDate &&
'Lease Ledgers'[corp or retail] = "CORPORATE"
)
)
RETURN
IF(
ISBLANK(SalesAmount),
0,
SalesAmount
)
At the same time, I also created a calculated column that represents the month for a better view
Put measure and Month field in matrix visual, you can see the following preview:
The subtotals of the matrix are the sum of the values for the current month. The maximum total is the sum of the current months, not the sum of November and December.
You can switch slicers to see the sum of November or December
This is my understanding of your problem, you can correct it if it is not, and you can also use sample data to show your expected results.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.