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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Logical DAX problem

Good morning!!!!

I have recently encountered a problem when developing a formula in which I compare several dates to check the delivery status of a milestone.

I need to unify three conditions to validate a state and the problem before me is that I can only use two arguments when I use the AND function.

I have to validate three dates at once, but I can't find a way to do it.

The structure I have achieved is as follows, I would need to compare a third date (Committed Date Review-Blank())

IF(AND(Milestones[Committed Date]<DATE(2020,11,30),Milestones[Actual Date Compliance]-Blank()),"3. Milestones Not Fulfilled"
If anyone can help me, it would be quite a dream!!!!
Thanks a lot!

1 ACCEPTED SOLUTION
AlB
Super User
Super User

@alvarolpz17

Example:

IF (
    Milestones[Committed Date] < DATE ( 2020, 11, 30 )
        && Milestones[Actual Date Compliance] = BLANK ()
        && Milestones[Committed Date] > DATE ( 2020, 08, 31 ),
    "3. Milestones Not Fulfilled"
)

where I've added a 3rd random condition so you can see the operator's usage &&

Please mark the resolved question when you are finished and consider giving a thumbs up if the posts are useful.

Contact me privately for assistance with any large-scale BI needs, tutoring, etc.

Bless you

SU18_powerbi_badge

View solution in original post

3 REPLIES 3
AlB
Super User
Super User

@alvarolpz17

Example:

IF (
    Milestones[Committed Date] < DATE ( 2020, 11, 30 )
        && Milestones[Actual Date Compliance] = BLANK ()
        && Milestones[Committed Date] > DATE ( 2020, 08, 31 ),
    "3. Milestones Not Fulfilled"
)

where I've added a 3rd random condition so you can see the operator's usage &&

Please mark the resolved question when you are finished and consider giving a thumbs up if the posts are useful.

Contact me privately for assistance with any large-scale BI needs, tutoring, etc.

Bless you

SU18_powerbi_badge

Anonymous
Not applicable

Hello

But should I use IF in front of those AND conditions?

alvarolpz17_0-1606996336794.png

I get the following error...

AlB
Super User
Super User

Hi @Anonymous 

You can either use nested AND( )s or, easier, use the && operator, which is a logical AND as well:

condition1 && condition2  && condition3 &&  ....  && conditionN

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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