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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Creating a quarter to date flag in a date table

Hi everyone,

 

I need to create a quarter to date flag, using DAX or M, in a date table where the fiscal year starts on 4/1. Below are the details around when there would need to be a "Y" within the Is_QTD flag column. Given it's currently June, the flag should show Y for Q1, or Apr - June.

Thanks in advance and kudos to anyone who can assist!

 

bchager6_0-1687222957546.png

 

1 ACCEPTED SOLUTION

This should ideally not be solved with a calculated column.  It should be solved with a measure.  Share data with budget numbers and show the expected result for a few months.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@Ashish_MathurI have a requirement to add previous quarter's to current quarter's forecasts, throughout the year. Quarter to date was probably not the best way to describe it because yes that refers to the current quarter. In July I'll need to add the Apr through Sep forecasts for example, and I'm thinking that creating an expression with a Is_QTD filter is the way to go. I tried to make that clear in my original post by noting when there should be a "Y" in the Is_QTD flag column and made it more clear below.

 

bchager6_1-1687308425975.png

 

 

This should ideally not be solved with a calculated column.  It should be solved with a measure.  Share data with budget numbers and show the expected result for a few months.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur  Agreed. I figured something out. Thanks!

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Is current Q? = 1*(AND(today()>=CALCULATE(MIN(Data[Date]),FILTER(Data,Data[quarter]=EARLIER(Data[quarter]))),today()<=EOMONTH(CALCULATE(MAX(Data[Date]),FILTER(Data,Data[quarter]=EARLIER(Data[quarter]))),0)))

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur  thank you. I am going to save this for when I need a current quarter flag. I changed my system date to be in July and found that your expression populates 0s for Apr - Jun where I need for them to remain 1s during the month of July along with having 1s in Jul, Aug, and Sep.

bchager6_0-1687260690403.png

 

You are welcome.  That does not make sense.  If today's quarter is not the current quarter, then there should be a 0 (as very clearly explained by you in your previous post).  1 should appear only for the months of the current quarter.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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