Forum Discussion
Power Bi Default Date Value
Hi I'm trying to figure out a date periods problem.
I created the Date Periods table and I'm using the type column with my slicer. I want my tables to be Month To Day(MTD) by default when i close and reopen my report .I should be able to choose another selection for example YTD but When I open my report It should be MTD. How can I do this ?
2 Replies
- amitchandakSuper User
Glsmnbsrn , You can use a relative date slicer.
else you can have columns like
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1*month(Today())),"Last year Last Month" ,
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
MTD Type = Switch( True(),eomonth([Date],0)= eomonth(Today(),0) && [Date] <=today() ,"MTD" ,
Format([Date],"MMM-YYYY")
)Is Today = if('Date'[Date]=TODAY(),"Today",[Date]&"")
And use MTD measure
refer
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=35
- AnonymousNot applicable