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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AliceW
Power Participant
Power Participant

If a date is in current quarter, then something, else, something else; help

Hi guys,

I'm stuck. Please help out.

So, I'm having a dataset, with Opportunities and their Close Dates, Amount Non-Weighted, and Amount Weighted.

I'd like to have a formula in a column saying: if Close Date is in the CURRENT QUARTER, then Amount Non-Weighted, else Amount Weighted.

Thank you so much.

Alice

1 ACCEPTED SOLUTION
Gordonlilj
Solution Sage
Solution Sage

Hi,

 

Try creating a calculated column like something below and see if it helps

CalcColumn = 

IF( YEAR( 'Table'[Close Date] ) & QUARTER( 'Table'[Close Date] ) = YEAR( TODAY() ) & QUARTER( Today() ),
'Table'[Amount Non-Weighted],'Table'[Amount Weighted] )

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hey @AliceW ,

 

I would use an if like in a calculated column like:

 

if = if(quarter([Date])=Quarter([Now())," Amount Non-Weighted","Amount Weighted")

 

Let me know if it helped, if so mark as solution.

 

Best Regards,

Duarte Raminhos

Hi Duarte,

I can't seem to find QUARTER in the function list.

Gordonlilj
Solution Sage
Solution Sage

Hi,

 

Try creating a calculated column like something below and see if it helps

CalcColumn = 

IF( YEAR( 'Table'[Close Date] ) & QUARTER( 'Table'[Close Date] ) = YEAR( TODAY() ) & QUARTER( Today() ),
'Table'[Amount Non-Weighted],'Table'[Amount Weighted] )

 

Hi Gordon,

Based on your suggestion, I figured it out. for some reason, QUARTER is not available in my list of functions, but I did use FORMAT(TODAY(),"Q").

Thank you!

Alice

Good to hear that you solved it.

The quarter function came with the 2019 december update so perhaps you don't have the latest version

 

They have finally added the Quarter function? Hourray! I'll download it now - you were right, I did not have it.

Thanks again, Gordon!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.