Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
For a time calender I need the comparable 9distinct) last day of the quarter of the last quarter.
I am trying this, but not sure what neeeds to e changed:
Solved! Go to Solution.
Hi @acg
If you want to find the last day of the last quarter based on Today Date (or any specific date), you can use the below code:
CompareDateQuarter =
VAR _Today =
TODAY ()
RETURN
VAR _LastQuarter =
QUARTER ( _Today ) - 1
RETURN
VAR _LastQMonth = _LastQuarter * 3
RETURN
DATE ( YEAR ( _Today ), _LastQMonth + 1, 1 ) - 1
The output will be as below:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Need to see, whether I can rework this with a dynamic quater date- in other words, it needs to work with any quarter date.
Hi @acg
If you want to find the last day of the last quarter based on Today Date (or any specific date), you can use the below code:
CompareDateQuarter =
VAR _Today =
TODAY ()
RETURN
VAR _LastQuarter =
QUARTER ( _Today ) - 1
RETURN
VAR _LastQMonth = _LastQuarter * 3
RETURN
DATE ( YEAR ( _Today ), _LastQMonth + 1, 1 ) - 1
The output will be as below:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
20 | |
14 | |
10 | |
9 | |
6 |