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
rezaaditia
Helper III
Helper III

IF And function more than 2 conditions

Hi -

 

I am trying do if and function with more than 2 condition in DAX which there is limitation on that.

IF DATE([sap_insert_date]) = [Filter Date Validate]
    AND [Validate Po Release Supplier] = "yes"
    AND [Validate Source] = "backlog"
    AND [Validate Po Approval] = "no"
    AND [poa] !=""
    THEN "True"
    ELSE "false"
END

can someone please help me how to achieve this?

 

Thanks

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

You can use && instead of AND, so your code would look something like this.

 

For further reading, here is a link to the DAX operator reference:  https://docs.microsoft.com/en-us/dax/dax-operator-reference

 

Hope this helps.

 

IF DATE([sap_insert_date]) = [Filter Date Validate]
    && [Validate Po Release Supplier] = "yes"
    && [Validate Source] = "backlog"
    && [Validate Po Approval] = "no"
    && [poa] !=""
    THEN "True"
    ELSE "false"
END

View solution in original post

Anonymous
Not applicable

You can start with something like this:

 

CALCULATE
(
	[Your Measure]
	,FILTER
	(
		'Table'
		,'Table'[sap_insert_date] = MAX([Filter Date Validate])
		&& 'Table'[Validate Po Release Supplier] = "yes"
		&& 'Table'[Validate Source] = "backlog"
		&& 'Table'[Validate Po Approval] = "no"
		&& NOT ISBLANK('Table'[poa])
	)
)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

You can use && instead of AND, so your code would look something like this.

 

For further reading, here is a link to the DAX operator reference:  https://docs.microsoft.com/en-us/dax/dax-operator-reference

 

Hope this helps.

 

IF DATE([sap_insert_date]) = [Filter Date Validate]
    && [Validate Po Release Supplier] = "yes"
    && [Validate Source] = "backlog"
    && [Validate Po Approval] = "no"
    && [poa] !=""
    THEN "True"
    ELSE "false"
END

thanks @Anonymous  its working now.

 

next question, if i want to create in measure, can you please teach me again 🙂

 

thanks

Anonymous
Not applicable

You can start with something like this:

 

CALCULATE
(
	[Your Measure]
	,FILTER
	(
		'Table'
		,'Table'[sap_insert_date] = MAX([Filter Date Validate])
		&& 'Table'[Validate Po Release Supplier] = "yes"
		&& 'Table'[Validate Source] = "backlog"
		&& 'Table'[Validate Po Approval] = "no"
		&& NOT ISBLANK('Table'[poa])
	)
)

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.