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

Number of occurences based on filters

Dear all,

 

I've got a problem with showing the duplicated values basesd on filters set in report. What I want to achive is to see how many Point of Sales are beeing providing products by more than 1 distributor based on choosen period & distributors.

 

Let's say I have table:

 

YearDistributorPoS
2018C1PoS1
2018C1PoS2
2018C1PoS3
2018C1PoS4
2018C2PoS1
2018C2PoS3
2018C2PoS4
2018C2PoS5
2018C2PoS6
2018C3PoS3
2018C3PoS4
2018C3PoS6
2018C3PoS7
2018C4PoS1
2018C4PoS3
2018C4PoS5
2018C4PoS7
2018C4PoS8
2019C1PoS3
2019C1PoS4
2019C2PoS1
2019C2PoS3
2019C3PoS7
2019C4PoS1
2019C4PoS3
2019C5PoS1
2019C5PoS4

 

In total 2018 (without filters on Distributors) I would like to see:

 

PoSNb of Distributors
PoS13
PoS21
PoS34
PoS43
PoS52
PoS62
PoS72
PoS81

which means that there are 8 uniques PoS, 2 of them are beeing provided products by 1 distributor, and 6 of them are provided by at least 2 distributors.

 

After setting filter on Distributor C1 & C2 the result would be like this:

PoSNb of Distributors
PoS11
PoS21
PoS32
PoS42
PoS61
PoS71

so there are 6 unique PoS, 4 of them are provided by 1 distributor, and 2 them are provided by at least 2 distributors.

 

Similar with 3 different distributors like C1 & C3 & C4:

PoSNb of Distributors
PoS12
PoS21
PoS33
PoS42
PoS51
PoS61
PoS72
PoS81

 

etc.

 

At first I whought about using calculated column to see which values are unique and which appear multiple times:

So i created mapping column to have date and PoS in one field:

MAP = 'Table1'[Year] & "_" & 'Table1'[PoS]

and then I checked the number of occurances in table

Chkduplicate = CALCULATE(COUNTA(Table1[MAP]);FILTER('Table1';'Table1'[MAP]=EARLIER('Table1'[MAP])))

This result was not something i want to see so it has to be done probbably using measures instead. 

 

Many thanks,

Piotr

2 REPLIES 2
PattemManohar
Community Champion
Community Champion

@Anonymous You can just change the "Distributor" field summarization to "Count(Distinct)" as show below in Values section. If you want to create measure then it will be. Shown both methods in the screenshots.

 

Test235 = DISTINCTCOUNT(Test235MeasureCount[Distributor])

 

image.pngimage.pngimage.pngimage.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

 

 

 

count = CALCULATE([Test235];FILTER(Table1;[Test235]>1))

 

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