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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
f_e_user
Regular Visitor

Two Subset of List - How to do it in DAX

Dear Guru of PowerBI,
I've my data model

f_e_user_0-1688650889374.png

What I'm trying to achieve is to find the Server that are not related to a Business Service.
Server links to Business Service through Server.sys_id = Business_Service.child
I managed to calculate the formula and verify it from client :

Total Server =
CALCULATE(DISTINCTCOUNT(SYS_ID['Server']),
FILTER('Server', Active = "True"))

Total server_BS= CALCULATE(DISTINCTCOUNT(child['Business Service']),
FILTER(Server, Active = "True"))


The Server that are not linked to a BS is given from measure Total Server (3560) - Total Server_BS(3500).
So in this case, there are 60 Servers that have not been linked to a Business Service.
I need to create a Drill Through Page where I show the these 60 Servers.
I don't know how to do it in DAX, if it would be Python it would be like this :

List_sysid_server = pd.Dataframe(df.id.filter(df['Active'] = True))
List_sysid_BS     = pd.Dataframe(dfBS.id,filter(df['Active']= True))

#I Have Two Arrays of sys_ID (Sys_id is like "23ad9402adh24bt")
#First Array contains sys_ID of Server
#Second Array contains Child (that is Foreign Key, is a SYS_ID)
#I need to obtain in dax, the SYS_ID in first Array that are not in second Array
List_sysid_not_related = set(List_sysid_server - List_sysid_BS  )

 

f_e_user_1-1688651868266.png


How can I show that 60 IDs that are Present in the server but not in the child column with DAX Logic?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @f_e_user ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1689752398651.png

vtangjiemsft_1-1689752409316.png

(2) You can use the EXCEPT() function to create a table.

Servers Not Linked to BS = 
VAR List_sysid_server = FILTER('Server','Server'[Active]="TRUE")
VAR List_sysid_BS = FILTER('Business_Service','Business_Service'[Active]="TRUE")
RETURN  EXCEPT(List_sysid_BS,List_sysid_server)

(3) Then the result is as follows.

vtangjiemsft_2-1689752455860.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @f_e_user ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1689752398651.png

vtangjiemsft_1-1689752409316.png

(2) You can use the EXCEPT() function to create a table.

Servers Not Linked to BS = 
VAR List_sysid_server = FILTER('Server','Server'[Active]="TRUE")
VAR List_sysid_BS = FILTER('Business_Service','Business_Service'[Active]="TRUE")
RETURN  EXCEPT(List_sysid_BS,List_sysid_server)

(3) Then the result is as follows.

vtangjiemsft_2-1689752455860.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors