Forum Discussion

Da_clint's avatar
Da_clint
Frequent Visitor
3 years ago
Solved

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

 

 

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

3 Replies

    • Da_clint's avatar
      Da_clint
      Frequent Visitor

      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 

  • Da_clint's avatar
    Da_clint
    Frequent Visitor
    I Solved it throught:
     
    Invoice Count = CALCULATE(DISTINCTCOUNTNOBLANK('Vendor'[Vendorname]),
    FILTER('Spend actuals',[Spend] >0))