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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.