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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Average on distinctCount

Dear everyone,

I need help to have the average of a distinctCount. I did some research , but without success. I hope that I will be clear:

I have the data below:

mystarc_0-1653950091180.png

 

I would like to know the distinct count color per country per product, so I created a new measure DistinctCount. So I created a matrix that display these info:

mystarc_1-1653950196624.png

 

But now, I need the average per country in a diagram or table like below in blue. I don't know how to do it. Can you please help me ? Thank you very very much !

mystarc_2-1653950285200.png

 

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

Average Per Country = 
VAR _A =
    SUMMARIZE (
        'Table',
        'Table'[Country],
        'Table'[Product],
        "DisC", DISTINCTCOUNT ( 'Table'[Color] )
    )
RETURN
    AVERAGEX ( _A, [DisC] )

 

Output:

VahidDM_0-1653951651332.png

 

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 Do you like to see the FIFA Word Cup Dashboard:

https://community.powerbi.com/t5/Charticulator-Design-Challenge/FIFA-World-Cup-Medal-Records/cns-p/2545975

 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

Average Per Country = 
VAR _A =
    SUMMARIZE (
        'Table',
        'Table'[Country],
        'Table'[Product],
        "DisC", DISTINCTCOUNT ( 'Table'[Color] )
    )
RETURN
    AVERAGEX ( _A, [DisC] )

 

Output:

VahidDM_0-1653951651332.png

 

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 Do you like to see the FIFA Word Cup Dashboard:

https://community.powerbi.com/t5/Charticulator-Design-Challenge/FIFA-World-Cup-Medal-Records/cns-p/2545975

 

Anonymous
Not applicable

Thank you very very much @VahidDM !!! It works very well ! You saved my day 😁

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.