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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Da_clint
Frequent Visitor

Count distinc Vendors based on spend values

Hi

 

Im trying to Count distinct Vendors based on if they have a spend value in a different table.

With the DistinctCount I get 9 vendors but as in the right table I only want to show 7 since those are the one with spend data.

I have the Vendor name in one table(1) and the spend data in another tabel(2),  I have linked them through vendor number.

 

The reason for 9 insted of 7 is that 2 of the vendors do not have any actual spend during 22-21

 

Da_clint_0-1678192909802.png

 

1 ACCEPTED SOLUTION
Da_clint
Frequent Visitor

I Solved it throught:
 
Invoice Count = CALCULATE(DISTINCTCOUNTNOBLANK('Vendor'[Vendorname]),
FILTER('Spend actuals',[Spend] >0))
 
 

View solution in original post

3 REPLIES 3
Da_clint
Frequent Visitor

I Solved it throught:
 
Invoice Count = CALCULATE(DISTINCTCOUNTNOBLANK('Vendor'[Vendorname]),
FILTER('Spend actuals',[Spend] >0))
 
 
FreemanZ
Super User
Super User

hi @Da_clint 

try like:

try like:
measure =DistinctCount(spenddata[vendors])

Hi as I mentioned I dont have the vendor in tabel 1 & the spend in Tabel2.  This solution dos not take that into consideration if I understan it correctly 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.