Skip to main content
cancel
Showing results for
Search instead for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper III

## Filter DAX measure based of static date

Hi all,

I have a DAX measure that looks like this:

current qtr sales = Calculate(sum([sales]),[FY_QTR] = "2022-Q1")

I also have a table in Power query named 'Current QTR' that states the current QTR. it looks like this

 current fy qtr 2022-Q1

Now I want to point the DAX measure where the [FY_QTR] filter is to look at the 'Current QTR' table so that the dax is automatically updated with the most recent qtr date.

Is this possible?

1 ACCEPTED SOLUTION
Solution Sage

Hi @Vind1989 ,

Try changing your measure to something like this :

current qtr sales =

var _qtr = max('Current QTR'[current fy qtr])
var _sales = Calculate(sum([sales]),[FY_QTR] = _qtr)

RETURN
_sales

Kind regards,

Rohit

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

3 REPLIES 3
Solution Sage

Hi @Vind1989 ,

Try changing your measure to something like this :

current qtr sales =

var _qtr = max('Current QTR'[current fy qtr])
var _sales = Calculate(sum([sales]),[FY_QTR] = _qtr)

RETURN
_sales

Kind regards,

Rohit

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

Helper III

@rohit_singh thats an easy fix, i totally didnt even think of this as the easiest way. thank you

Solution Sage

Hi @Vind1989 ,

Happy to help. Please mark my answer as the solution so that it may help others as well. Please do press the thumbs up button to leave me kudos. Will really appreciate it!

Kind regards,

Rohit

## Helpful resources

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors