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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.