cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Using Dax or M in visual advanced filter

Hello,

 

I want to filter a matrix to only show data from the current fiscal year.  I'm using direct query so could create a view with a YEAR(GETDATE()) Column in SQL and select that in basic mode, or as a calcualted column in power bi but I was wondering if you could just do it via DAX or M directly in the filter as per the below?

 

 

image.png

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: Using Dax or M in visual advanced filter

Hi @RobbLewz 

 

I suggest you consider adding Relative Date Dimension to your model.

https://community.powerbi.com/t5/Community-Blog/Relative-Date-Dimension/ba-p/779039

 

Or use Relative date Filters

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Highlighted
Regular Visitor

Re: Using Dax or M in visual advanced filter

Thanks, that's good to know, but that will filter all the visuals on the page then though wont it?

 

I'm just want to filter one specific matrix to only show the data for the current fiscal year.

Highlighted
Super User IV
Super User IV

Re: Using Dax or M in visual advanced filter

Hi @RobbLewz 

 

You should be able to achieve this with the second suggestion,  Relative date Filters

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.



Highlighted
Regular Visitor

Re: Using Dax or M in visual advanced filter

Thanks for the infop, the relative date filter is good to know but unforunatley it doesn't deal with the fiscal year, only last 12 months or calendar year. 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors