cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft

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.

View solution in original post

v-jiascu-msft
Microsoft
Microsoft

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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!