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! Request now

Reply
Anonymous
Not applicable

From list to distinct list and then on the basis of distinct list find count.

Hi,

 

I'm trying to count of names greater than 1 from ditisnct list.

Thanks in advance.

 

Capture.JPG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

 

If you want dynamic change 'distinct count' based slicer, you can try to use below formula.

Result = 
COUNTROWS (
    FILTER (
        SUMMARIZE ( ALLSELECTED(Table2), [Name], "Count", COUNT ( Table2[Name] ) ),
        [Count] > 1
    )
)

4.gif

 

Regards,

Xiaoxin Sheng

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

Hi @Anonymous,

 

I think you can write a measure with summarize and countrows functions to achieve your requirement.

 

Sample formula:

Result =
COUNTROWS (
    FILTER (
        SUMMARIZE ( 'Main List', [Name], "Count", COUNT ( 'Main List'[Name] ) ),
        [Count] > 1
    )
)

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous @vanessafvg
Thanks for reply..


I'm getting result for only selected week only. But if I want a result from 0 - 41(selected filter).

*I'm  trying to find result for week 0-41. Suppose I select a week 41 in slicer , then I get main list (Image) and after that I trying to find distinct Count (Distinct list(image)) from week 0-41 and on top of that I trying to find count of names greater than 1.
All these in a measure1.

Anonymous
Not applicable

Hi @Anonymous,

 

Can you please share a pbix sample file with expected result? I will try it and share the formula if I can achieve these requirements.

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

@Anonymous

Thanks for helping me.

 

I Do't know how to attach sample file, so sharing link. Hope this will help.

 

https://drive.google.com/file/d/1_Hx45yeCaCs4-8TEpREvyvQ_YabCbZnV/view?usp=sharing

Anonymous
Not applicable

HI @Anonymous,

 

If you want dynamic change 'distinct count' based slicer, you can try to use below formula.

Result = 
COUNTROWS (
    FILTER (
        SUMMARIZE ( ALLSELECTED(Table2), [Name], "Count", COUNT ( Table2[Name] ) ),
        [Count] > 1
    )
)

4.gif

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous

 

Thanks for helping me.

 

Actullly you selecting range, that's y you getting proper result but while drawing this to graph it will automatically select single week(as week is on X axis) and shows result for that particular week.

 

So when I draw graph, week 41 will show 33 unique customer greater than 1 . 

 

vanessafvg
Super User
Super User

@Anonymous you could do a group by in power query / m  with a count result and then creat a conditional column  where the count value is > 1?





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!




Anonymous
Not applicable

Thanks, really appreciate you for response. But I've some doubts.

 

There are week , date col. on left and many other col..

 

What I'm trying to do.

  

 Suppose I select a week 41 in slicer , then I get main list (Image) and after that I trying to find distinct Count (Distinct list(image)) from week 0-41 and on top of that I trying to find count of names greater than 1...all these in a measure1.

 

 

thanks in advance

@Anonymous

 

Try this MEASURE

 

Measure =
COUNTROWS (
    FILTER (
        ALLSELECTED ( Table1[Name] ),
        CALCULATE ( COUNT ( Table1[Name] ) > 1 )
    )
)
Anonymous
Not applicable

Thanks Zubair,

 

I used the formula with little editing , but getting error. I trying to find result for week 0-41. Suppose I select a week 41 in slicer , then I get main list (Image) and after that I trying to find distinct Count (Distinct list(image)) from week 0-41 and on top of that I trying to find count of names greater than 1...all these in a measure1.

Measure =
COUNTROWS (
    FILTER (
        ALLSELECTED ( Table1[Name] ),
        CALCULATE ( COUNT ( Table1[Name] ) > 1,table[week]<=max(table[week) )
    )
)

 

 

Thanks for help.. 

Cheers! 

@Anonymous try this maybe?

 

Measure =
COUNTROWS (
    FILTER (
        ALLSELECTED ( Table1[Name] ),
        CALCULATE (
            COUNT ( Table1[Name] ) > 1,
            FILTER ( table, table[week] <= MAX ( table[week] ) )
        )
    )
)




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!




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