Forum Discussion
Anonymous
7 years agoNot applicable
MTD Returning YTD Value in Cell
Hi,
I am creating a report using an excel file. It is straightforward enough. I just need to calcuate MTD, YTD and the variances between both for range of different years.
I have used these calculations before using quick measures and they worked perfectly. However my MTD Calculations are returning YTD if there is no MTD Value. The Total Calculation at the end is correct but the cells are not. In the first column my calculation works but it is a column not a measure so it has limitations.
Total
Has anyone seen this before or know why it is occuring?
This is the calculation for my Column
SalesMTD =
IF( AND
(AND(
('Item Ledger Entries'[Posting Date].[MonthNo]=(MONTH(TODAY()))),
('Item Ledger Entries'[Posting Date].[Year] = YEAR(TODAY()))),
('Item Ledger Entries'[Posting Date].[Date] <= TODAY())) ,
'Item Ledger Entries'[Sales Amount (Actual)],
BLANK())
This is the calculation for my MTD Measure
Sales Amount (Actual) MTD =
IF(
ISFILTERED('Item Ledger Entries'[Posting Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
TOTALMTD(
SUM('Item Ledger Entries'[Sales Amount (Actual)]),
'Item Ledger Entries'[Posting Date] //(Have tried this with .[Date] at the end but that returns blanks)
)
)
No Replies