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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
GC0001
New Member

Need a DAX formula for finding count of servers of Table1 which are missing from Tables 2,3,4

All 4 tables are connected through index column
Table1 is VM having Col: Server_name
Table2 is Tool having Col: Server_name
Table3 is Excluded having Col: Server_name,Tool_Name
Table4 is Active having Col: Server_name,Tool_Name

I want count of server names of VM table which are not present in any three tables which are Tool, Excluded, Activeusing DAX formula and from Excluded and Active table I only want values to be searched which have "D" as value in Tool_Name column.

Tried dax formulas from Chat gpt and all but showing parameter unexpected and Cant find values errors

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

Hi @GC0001 ,

 

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

(1) This is my test data. 

vtangjiemsft_0-1713838507536.png

(2) We can create a table.

Table = 
var _t2=VALUES('Tool'[Col: Server_name])
var _t3=CALCULATETABLE(VALUES('Excluded'[Col: Server_name]),'Excluded'[Tool_Name]="D")
var _t4=CALCULATETABLE(VALUES('Active'[Col: Server_name]),'Active'[Tool_Name]="D")
var _t=UNION(_t2,_t3,_t4) 
RETURN EXCEPT(VALUES('VM'[Col: Server_name]),_t)

(3) We can create a measure. 

Count = COUNTROWS(ALL('Table'))

(4) Then the result is as follows.

vtangjiemsft_1-1713838576894.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

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @GC0001 ,

 

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

(1) This is my test data. 

vtangjiemsft_0-1713838507536.png

(2) We can create a table.

Table = 
var _t2=VALUES('Tool'[Col: Server_name])
var _t3=CALCULATETABLE(VALUES('Excluded'[Col: Server_name]),'Excluded'[Tool_Name]="D")
var _t4=CALCULATETABLE(VALUES('Active'[Col: Server_name]),'Active'[Tool_Name]="D")
var _t=UNION(_t2,_t3,_t4) 
RETURN EXCEPT(VALUES('VM'[Col: Server_name]),_t)

(3) We can create a measure. 

Count = COUNTROWS(ALL('Table'))

(4) Then the result is as follows.

vtangjiemsft_1-1713838576894.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. 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!