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
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
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

sayaliredij
Solution Sage
Solution Sage

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
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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors