I need to edit all the graphs that I have easily by clicking on a switch "MTD".
I thought to create a filter with just one checkbox "MTD". By clicking it all graphs show me the MTD values, otherwise all the other values aka YTD.
The only problwem is that I don't have the MTD info, and moreover I want it to be automated. In excel I would easily make a combination of function, where if the month in the date is the current one, it gives me MTD, otherwise nothing.
Is there a way to create this editing the query in DAX format?
Thanks a lot or your tips bt I don't really see them matching my case.
I'm almost getting to the function in the query editor and I wrote the following code:
= Table.AddColumn(#"Replaced Value2", "MTD", each if [Created] <= #datetime(2016, 12, 31, 0, 0, 0) then "MTD" else if [Created] >= #datetime(2016, 12, 1, 0, 0, 0) then "MTD" else null )
The column "Created" shows when the lead has been created, I wnat to create a new column where it says MTD if the lead has been created in december (for sake of the example, once the function will be set I'd like to have the MTD reflecting the current date). Then, once i'll have the column filled with MTD and null values, I can insert a slicer in the canvas where the user can switch the MTD view as he wants.