Forum Discussion
vasotsich
3 years agoFrequent Visitor
TOTALYTD returns values from previous years
Hi all, I am trying to work with the function TOTALYTD(). I have the following measure: YTD = TOTALYTD ( [SUM Quantity], 'Dim InvoiceDate'[DATE_] ) The problem is that I get values for mo...
- 3 years ago
Found the solution from this topic: https://community.powerbi.com/t5/Desktop/Hiding-future-values-for-TotalYtd-for-current-year-against-a/m-p/143809
I changed the measure to the following:
YTD = VAR _ytdvalue = TOTALYTD ( [SUM], 'Dim InvoiceDate'[DATE_] ) RETURN IF ( MONTH ( MAX ( 'Dim InvoiceDate'[DATE_] ) ) <= MONTH ( TODAY () ), _ytdvalue, BLANK () )
vasotsich
3 years agoFrequent Visitor
Found the solution from this topic: https://community.powerbi.com/t5/Desktop/Hiding-future-values-for-TotalYtd-for-current-year-against-a/m-p/143809
I changed the measure to the following:
YTD =
VAR _ytdvalue =
TOTALYTD ( [SUM], 'Dim InvoiceDate'[DATE_] )
RETURN
IF (
MONTH ( MAX ( 'Dim InvoiceDate'[DATE_] ) ) <= MONTH ( TODAY () ),
_ytdvalue,
BLANK ()
)