cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

dynamically filter visual by current month?

Whats the best way to filter a visual to data from only the current month.   Would it be to create a measure filtering on latest month or is there an easier way?


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: dynamically filter visual by current month?

Hi @vanessafvg,

 

You can simply to create a calculated table to filter data with today function, then use this new table as the source of visual.

 

Current Month = CALCULATETABLE(DateTable,FILTER(ALL(DateTable),FORMAT([Date],"mm yyyy")=FORMAT(TODAY(),"mm yyyy")))

 

4.PNG

 

Notice: original datetable contains date from 2015 to 2017, after above steps, it only contains current month data.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
4 REPLIES 4
lalthan Regular Visitor
Regular Visitor

Re: dynamically filter visual by current month?

Create a calculated column on your date table to identify current month and past month.

Community Support Team
Community Support Team

Re: dynamically filter visual by current month?

Hi @vanessafvg,

 

You can simply to create a calculated table to filter data with today function, then use this new table as the source of visual.

 

Current Month = CALCULATETABLE(DateTable,FILTER(ALL(DateTable),FORMAT([Date],"mm yyyy")=FORMAT(TODAY(),"mm yyyy")))

 

4.PNG

 

Notice: original datetable contains date from 2015 to 2017, after above steps, it only contains current month data.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
harakuruku Regular Visitor
Regular Visitor

Re: dynamically filter visual by current month?

Hi tried the formula but got this error: "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

Here's my formula: Current Month = CALCULATETABLE(hd_backorders, FILTER(ALL(hd_backorders), FORMAT(hd_backorders[hd_estfulfillmentdate], "mm yyyy") = FORMAT(TODAY(), "mm yyyy")))

Highlighted
dawidvh Frequent Visitor
Frequent Visitor

Re: dynamically filter visual by current month?

Hi everyone.

 

This functionality hasn't always been there, but if you have a proper formatted date column or better a dedicated date table, you can simply use the relative date filtering. See below:

 

2019-02-01_09-09-54.jpgRelative Date Filtering Power BI