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

DAX help requied

I need help with creating a measure for the percentage of products with more than 1000 sales.

 

The table I have is called products which is a list of sales with each row a unique sale. Within this table I have a column called Product Name.

 

I have created a measure for total sales which is the count of site product name. But the measure I need is a little beyond me at the moment.

As I can’t work out in the one measure how to combine the following. 
1. Number of PRODUCTS
2. Number of SALES per PRODUCT
3. Number of PRODUCTS with more than 1000 SALES 
4. % of PRODUCTS with more than 1000 SALES

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @TonyAshton 

try like:

BestProduct% =
VAR _allrproduct = 
COUNTROWS(ALL(TableName[Product Name]))
VAR _bestproduct =
COUNTROWS(
    FILTER(
        VALUES(TableName[Product Name]),
        CALCULATE(COUNTROWS(TableName))>=1000
    )
)
RETURN
DIVIDE(_bestproduct, _allrproduct)

View solution in original post

2 REPLIES 2
TonyAshton
Frequent Visitor

Thank you. This works great.

FreemanZ
Super User
Super User

hi @TonyAshton 

try like:

BestProduct% =
VAR _allrproduct = 
COUNTROWS(ALL(TableName[Product Name]))
VAR _bestproduct =
COUNTROWS(
    FILTER(
        VALUES(TableName[Product Name]),
        CALCULATE(COUNTROWS(TableName))>=1000
    )
)
RETURN
DIVIDE(_bestproduct, _allrproduct)

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.