ytd switch
1 TopicMore Complex Than I Thought - YTD on a Switch Expression
I'm having an issue with a YTD expression on top of a another esperssion that's working fine. The intent is to get an outlook for a metric (Sales for example). The underlying OUTLOOK expression is working fine, but I can't get a seemingly easy YTD expression to work properly embedding that OUTLOOK into the YTD DAX. Here's my code and results. Hopefully someone can help. Outlook = Var FCST_March = Calculate(SUM(CF[Fact-Forecast]), 'CF'[Version Type] = "March") Var FCST_June = Calculate(SUM(CF[Fact-Forecast]), 'CF'[Version Type] = "June") Var FCST_September = Calculate(SUM(CF[Fact-Forecast]), 'CF'[Version Type] = "September") Return switch(True, [CY Actual] <> 0, [CY Actual], FCST_September <> 0, FCST_September, FCST_June <> 0 , FCST_June, FCST_March <> 0, FCST_March, [Budget]) ---------------------------- Outlook YTD = TOTALYTD ( [outlook], 'CF'[Date].[Date] ) (I've tried just [date] as well) Here is the results - as you can see the OUTLOOK formula is working by picking up one of the forcast or budget scenerios. But the YTD formula can seem to resolve this. Maybe it needs to be stored in a temp table for later use. My expected results are also shown on the far right. Thanks for the help Middleb396Views0likes2Comments