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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
JChris
Helper II
Helper II

Need help to create a DAX formula to count if at least one item is present

First of all, I'll give a glimpse of the structure:

 

Table: Assets (lists of assets)

Columns: Hostname, Serial Number, Location, Owner

 

1 .. *

 

Table: Softwares (list of all softwares installed on each and all of the assets)

Columns: Serial Number (of the Asset), Software Name, Vendor, ID (custom column)

 

* .. 1

 

Table: Software Status (list of unique softwares, using the ID from Softwares)

Columns: Software Name, Vendor, Status, Description, ID (from Softwares)

 

I want to count the number of assets that have at least one software marked as Status="BAD". How can I do that?

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

if i understand correctly this is what you can do

 

have you created a relationship between your tables i.e  asset.serialno ---- software.serialno i  and then sofware.id ---sofwarestatus.id

 

set one of the relationships to both directions ie between assset.serialno and sofware.serial no (take cognisense that this could have a negative effect elsewhere)

 

 

create a new measure after you have create a relationships,

bad sofware = calculate (countrows(assets), Status="BAD")

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
vanessafvg
Super User
Super User

if i understand correctly this is what you can do

 

have you created a relationship between your tables i.e  asset.serialno ---- software.serialno i  and then sofware.id ---sofwarestatus.id

 

set one of the relationships to both directions ie between assset.serialno and sofware.serial no (take cognisense that this could have a negative effect elsewhere)

 

 

create a new measure after you have create a relationships,

bad sofware = calculate (countrows(assets), Status="BAD")

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!





@vanessafvg wrote:

if i understand correctly this is what you can do

 

have you created a relationship between your tables i.e  asset.serialno ---- software.serialno i  and then sofware.id ---sofwarestatus.id

 

set one of the relationships to both directions ie between assset.serialno and sofware.serial no (take cognisense that this could have a negative effect elsewhere)

 

 

create a new measure after you have create a relationships,

bad sofware = calculate (countrows(assets), Status="BAD")

 

 


 

Amazing, I didn't even need the DAX formula. I was using some slicers on my page and now that the relationship is set to BOTH, when I click to filter using Software Status = "BAD" it will update my cards accordingly, and one of them is "Count of Hostname" 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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