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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
DemandMGR
Helper I
Helper I

Custom Column or Dax Formula

I am tying to write a Dax Formula or a Custom Column, preferrably a custom column.

 

I want the formula to reference two Date columns. The two columns are ETADATE and APPTDATE. My goal is to idenitfy all the ETADATEs that are Today+ 3 days that do not have a APPTDATE, which shows up in the APPTDATE column as 1/1/2001.

 

The Today+3days would have to be rolling over every day. I can also change the 1/1/2001 No APPT indicator to anything else so if that doesnt work I would be happy to replace that value with something else.

 

Please let me know if you need more information but I would greatly appreciate some assistance with this. Thank you for reading

1 ACCEPTED SOLUTION

@DemandMGR , Small correction on what @ryan has suggested. Please create a new custom column with below code:-

 

column  = IF (
    ETADATE = TODAY ()
        || ETADATE
            = TODAY () + 1
        || ETADATE
            = TODAY () + 2,
    "PO#",
    "NO"
)

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

7 REPLIES 7
VahidDM
Super User
Super User

Hi @DemandMGR 

 

Can you post sample data as text and expected output?
Not enough information to go on;

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

What I am looking for is something like an IF(OR) fucntion from excel. Please see example below.

 

IF(OR(ETADATE=TODAY(),ETADATE=TODAY()+1,ETADATE=TODAY()+2),"PO#","NO")

 

Honestly I think I can figure out the rest from there. I am not even sure if this is possible but I am hoping it is

 

@DemandMGR 

pls try this

IF(ETADATE=TODAY() || ETADATE=TODAY()+1 || ETADATE=TODAY()+2),"PO#","NO")





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you for that. It didnt work though. There was an error under the E in the second ETADATE.

 

The examle of how I entered it below.

 

=IF([ETADATE]=TODAY() || [ETADATE]=TODAY()+1 || [ETADATE]=TODAY()+2),[PO#],'NO')

 

I have never seen an error under one letter when pulling in a column from the table. 

 

DemandMGR_0-1642713450199.png

 

@DemandMGR 

pls try to use DAX to create a colum, not in PQ.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I also tried this formula but I kept getting a error trying to close the formula 

 

IF([ETADATE]=TODAY(),[PHPONO],IF([ETADATE]=TODAY()+1,[PHPONO],IF([ETADATE]=TODAY()+2,[PHPONO] ,'NO')

@DemandMGR , Small correction on what @ryan has suggested. Please create a new custom column with below code:-

 

column  = IF (
    ETADATE = TODAY ()
        || ETADATE
            = TODAY () + 1
        || ETADATE
            = TODAY () + 2,
    "PO#",
    "NO"
)

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.