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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
megachuckmc721
Frequent Visitor

Calculated column using OR function - what am i doing wrong?

I'm trying to create what should be a pretty simple calculated column but need to compare more than 2 values which I am limited to with the OR Function.  I've tried using double pipe as well as the IN function and cannot seem to get any of those to work!

 

My goal is to evaluate Opportunity[CreatedDate] against the YEAR and then evaluate Opportunity[CreatedDate] against the MONTH to determine if the CreatedDate falls within the CY quarter.

 

Any help would be greatly aprreciated!

Mike

 

This is what I have tried so far:

#1

IsCurrentQtrCreated = IF ( YEAR ( Opportunity[CreatedDate] ) = YEAR ( TODAY () )
        && (MONTH ( Opportunity[CreatedDate] IN {10,11,12}),
"YES",
"NO"
))

 

#2

IsCurrentQtrCreated =IF ( YEAR ( Opportunity[CreatedDate] ) = YEAR ( TODAY () )
&& OR (MONTH ( Opportunity[CreatedDate] = 10 || Opportunity[CreatedDate] = 11 || Opportunity[CreatedDate] =12 ),
"YES",
"NO"
)

1 REPLY 1
fhill
Resident Rockstar
Resident Rockstar

Here's the hard coded version of your code working.  Did you want to intergrate TODAY() so it roates automatically?

 

CurrentQtrCheck = IF(YEAR(Query1[StartOfMonth]) = YEAR(TODAY()) && (MONTH(Query1[StartOfMonth]) = 10 || MONTH(Query1[StartOfMonth]) = 11 || MONTH(Query1[StartOfMonth]) = 12), "YES","NO")  

 

Capture.PNG

 

 

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.