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
leoleoniids
Frequent Visitor

Distinctcount based on measure values

Hi!

 

I am looking for solution to make a measure what in excel would be COUNTIFS.

 

How could I get card visual with counted rows what I can filter, but cannot make a simple number of rows.

 

I mean It could be something like this:

I have two table

  • PRODUCT
    • Product_id
    • admin_creator_id
  • IMG
    • Product_id
    • img_link

I need to count how many products is created by some admin and contains more the 25pic.

 

in sample is two rows with products that contain more then 25pic. So how could I get that number rows?

 

 

Screenshot 2021-05-11 at 22.17.24.jpgScreenshot 2021-05-11 at 22.17.30.jpg

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @leoleoniids 

I tried to create a sample pbix file based on the explanation.

Please check the below picture and the sample pbix file's link down below.

 

Picture1.png

 

Img Count =
VAR newtable =
SUMMARIZE (
'Product',
'Product'[Product_id],
'Product'[admin_creator_id],
"@countimg", COUNTROWS ( FILTER ( img, COUNTROWS ( img ) >= 25 ) )
)
RETURN
SUMX ( newtable, [@countimg] )
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @leoleoniids 

I tried to create a sample pbix file based on the explanation.

Please check the below picture and the sample pbix file's link down below.

 

Picture1.png

 

Img Count =
VAR newtable =
SUMMARIZE (
'Product',
'Product'[Product_id],
'Product'[admin_creator_id],
"@countimg", COUNTROWS ( FILTER ( img, COUNTROWS ( img ) >= 25 ) )
)
RETURN
SUMX ( newtable, [@countimg] )
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hello Jihwan,

Thank you. I have changed SUMX to COUNTAX to count a number of products that contains more the 25pic

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.