Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am working with the data below - table of organizations, servernames and services installed on each server:
Query_Server_Services
Company | forest | SystemName | ServiceName |
Contoso | contoso.com | ContosoSrv1 | svc1 |
Contoso | contoso.com | ContosoSrv1 | svc2 |
Litware | litware.net | LitwareSrv1 | svc1 |
Litware | Litware.ca | LitwareSrv1 | svc2 |
Fabrikam | fabrikam.org | Fabrikamsrv1 | svc1 |
Fabrikam | fabrikam.org | Fabrikamsrv2 | svc2 |
I have slicers for company name, forest name and service name.
If I filter for company, forest and service, how can I get the number of servers in that company and forest WITHOUT that service?
I have been able to plot the number of servers WITH the service using
Any help is appreciated!
Solved! Go to Solution.
For your count with service you don't need the calculate.
Count with service = DISTINCTCOUNT ( 'Table'[SystemName] )
Then we can use that one and some filtering to calculate those without the selected service.
Count without service = CALCULATE( DISTINCTCOUNT('Table'[SystemName]),ALLEXCEPT('Table','Table'[Company],'Table'[forest])) - [Count with service]
This counts the total number of systems for the selected [Company] and [Forest] using any service the subtracts the count for the selected service leaving us with the number not using the service.
My sample file is attached for you to look at.
That was an interesting one. This should get you what you are looking for.
Systems without service = VAR _Systems = VALUES ( 'Table'[SystemName] ) VAR _AllSystems = ALL ( 'Table'[SystemName] ) VAR _Missing = EXCEPT(_AllSystems,_Systems) RETURN CALCULATE ( CONCATENATEX ( VALUES ('Table'[SystemName]), 'Table'[SystemName],", " ), ALL ( 'Table'[ServiceName] ), 'Table'[SystemName] IN ( _Missing ) )
For your count with service you don't need the calculate.
Count with service = DISTINCTCOUNT ( 'Table'[SystemName] )
Then we can use that one and some filtering to calculate those without the selected service.
Count without service = CALCULATE( DISTINCTCOUNT('Table'[SystemName]),ALLEXCEPT('Table','Table'[Company],'Table'[forest])) - [Count with service]
This counts the total number of systems for the selected [Company] and [Forest] using any service the subtracts the count for the selected service leaving us with the number not using the service.
My sample file is attached for you to look at.
Quick question - how can I get a list of servers NOT running a service (SVC2, for example).
Since there are no rows indicating that SVR2 is NOT running SVC2, I understand this is not possible by default.
But would be possible to find "find all servers running SVC1 (assuming it runs on all servers) but NOT SVC2 (selected using the slicer)?
Thanks!
That was an interesting one. This should get you what you are looking for.
Systems without service = VAR _Systems = VALUES ( 'Table'[SystemName] ) VAR _AllSystems = ALL ( 'Table'[SystemName] ) VAR _Missing = EXCEPT(_AllSystems,_Systems) RETURN CALCULATE ( CONCATENATEX ( VALUES ('Table'[SystemName]), 'Table'[SystemName],", " ), ALL ( 'Table'[ServiceName] ), 'Table'[SystemName] IN ( _Missing ) )
@PowerBeeEye it might work
Measure = CALCULATE(COUNTROWS('Table'), ALL('Table'[ServiceName]))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
88 | |
49 | |
45 | |
38 | |
37 |