Forum Discussion

xuantalks's avatar
xuantalks
Frequent Visitor
7 years ago
Solved

How to hide Year-To-Date data after the selected date

Hi guys,

I want to just show Year-to-day revenue by the selected year and month (especially month in the past) as the below screenshot. Could you please give me advise?

Please download sample.pbix here

 

 

I tried these measures but they don't work well

 

Max Selected Date =
Var SelectedYear = IF(ISFILTERED('Dates'[Financial Year]), SELECTEDVALUE('Dates'[Financial Year], "No Selection"), "No Selection")
Var SelectedMonth = IF(ISFILTERED(Dates[Month]), SELECTEDVALUE(Dates[Month], "Jun"), "Jun")
Return IF (SelectedYear = "No Selection", BLANK(), MAXX(FILTER(Dates, AND('Dates'[Financial Year] = SelectedYear, Dates[Month] = SelectedMonth)), Dates[Date]))
 
New FYTD = if ( MAX(Dates[Date]) <= [Max Selected Date], [FYTD], BLANK())

5 Replies