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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

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
rohit_singh
Solution Sage
Solution Sage

Hi @Anonymous ,

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! 🙂

View solution in original post

3 REPLIES 3
rohit_singh
Solution Sage
Solution Sage

Hi @Anonymous ,

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! 🙂

Anonymous
Not applicable

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

Hi @Anonymous ,

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors