Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamically filter on current month - 1

Greeting lovely members .  i have a simple power bi report that i want to make it Dynamic .  My data base is simple , here is a sample : let's say this is the table where it contains the dat...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Here is the trick : 

    Current month test = if (FORMAT(DATEADD('Date'[Full date],1,MONTH),"mm yyyy")=FORMAT(TODAY(),"mm yyyy"),"true","false")
    Last year Current month test = if (FORMAT(DATEADD(DATEADD('Date'[Full date],1,YEAR),1,MONTH),"mm yyyy")=FORMAT(TODAY(),"mm yyyy"),"true","false")
     
    all i need to do is to filter my visuals based on these 2 columns and it solves the trick ğŸ˜Š