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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JQuon
Helper I
Helper I

Use WHERE condition in DAX with Union and Selectcolumns?

I've created a calculated table that takes information from 5 different tables and consolidates it into 3 appended columns (Category, Name, Complete Date) on a single table.  The calculated table was created using Filter, Union, and selectcolumns.  The filter returns all items that are  not BLANK in the "Completed Date" column.

 

Is there a way to use a where as or add multiple filters so I can return everything that is not BLANK and greater than the year January 2015?

 

 

Perforamance = filter(
     Union(
     Selectcolumns('Estimates',"Category","Estimator", "Name",'Estimates'[Estimator],"Completed Date",'Estimates'[Approval_Date]), [Completed Date]<>Blank())

 

1 ACCEPTED SOLUTION

The outcome in my original formula is working and I do not receive an error message. The entire formula is about 20 lines and in my example in the original post, I only included the first string of the union, which I understand may cause confusion.

 

Over the weekend I found a solution through additional research on the web and using || for more than one conditions appears to work.  I'm not sure why && doesn't work but || does.  Thanks for looking into this.

View solution in original post

5 REPLIES 5
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @JQuon,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I'm still searching for the proper solution.  Unfortunatenly, the && doesn't work with the rest of my string in my formula.  For now, I'm only able to filter on one condition listed in my original post.

 

Thanks

Hi @JQuon,

 

Is there an error? Or the outcome isn't correct? 

If the formula is complete, the UNION isn't correct there. Please refer to the snapshot below. 

Can you share a sample if you still have issues?

Use-WHERE-condition-in-DAX-with-Union-and-Selectcolumns

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The outcome in my original formula is working and I do not receive an error message. The entire formula is about 20 lines and in my example in the original post, I only included the first string of the union, which I understand may cause confusion.

 

Over the weekend I found a solution through additional research on the web and using || for more than one conditions appears to work.  I'm not sure why && doesn't work but || does.  Thanks for looking into this.

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @JQuon,

 

It seems your formula won't work. But you only need to add more conditions in the filter like below. 

 

, [Completed Date]<>Blank() && year([Completed Date]) >=2015)

If you'd like more detailed formula, please provide a sample.

 

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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