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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Filter with UNION

hello to all,

 

I created a unique table from 2 tables "BUDGprojects" and "REALprojects" / without duplicates, with the following DAX formula:

REF_REEL&BUDGProjects = DISTINCT(UNION(BUDGProjects, REELProjects)).

 

The resulting table has only one column, containing analytical accounts.

I would like to further improve this DAX formula by adding a filter: take only the cost accounts that start with F, J, G or E.

 

If any of you know how to modify this formula by taking only these 4 categories of accounts, I am interested in the syntax!

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try this formula.

 

Table = DISTINCT(UNION(FILTER(BUDGprojects,LEFT(BUDGprojects[column],1) in { "F","J","G","E"}),FILTER(BUDGprojects,LEFT(BUDGprojects[column],1) in { "F","J","G","E"})))

 

 

Best Regards,

Jay

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

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try this formula.

 

Table = DISTINCT(UNION(FILTER(BUDGprojects,LEFT(BUDGprojects[column],1) in { "F","J","G","E"}),FILTER(BUDGprojects,LEFT(BUDGprojects[column],1) in { "F","J","G","E"})))

 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
sayaliredij
Super User
Super User

You can try following formula

 

Newtable = DISTINCT(UNION(CALCULATETABLE(BUDGprojects,left(BUDGprojects[Account],1) in { "J","F","G","E"}) , CALCULATETABLE(REALprojects,left(REALprojects[Account],1) in { "J","F","G","E"})))
 
Regards,
Sayali 
 
If this post helps, then please consider Accept it as the solution to help others find it more quickly.
 
 




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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.