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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nick9000
Frequent Visitor

Vendor Count

Hi,

 

I am looking to create a card which will show the number of vendors used for the month. The report irs driven by slicers by year by month and I can currently get the vendor count in a table as a total at the bottom. 

 

excel.PNG

 

I currently do this by:

a measure with distinct count for the vendor number

visual filter for the GL actual column to filter out blanks

 

From the example above, I would be after a card displaying the value 14 being a vendor count, for the given period (set by slicers), is there a way to do this?

 

Thanks

1 ACCEPTED SOLUTION

Thanks Ashish, 

 

You put me on the right track and ended using which seems to work:

 

vendor count = CALCULATE(DISTINCTCOUNT(Data1[Vendor Name]),'Data2'[Detail PnL Name]= "Materials")

 

The filter was struggling with the GL Actual Materials as I didn't mention is was a measure as below, also with values to excludes being blanks.

 

GL Actual Materials = CALCULATE(SUM(Data1[Actual_Amount]) ,Data2[Detail PnL Name]= "Materials")

 

Thanks

 

Nick

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

May be a calculated field formula like this

 

=CALCULATE(DISTINCTCOUNT(Data[Vendor Name]),FILTER(Data,SUM(Data[GL Actual Materials])>0))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks Ashish, 

 

You put me on the right track and ended using which seems to work:

 

vendor count = CALCULATE(DISTINCTCOUNT(Data1[Vendor Name]),'Data2'[Detail PnL Name]= "Materials")

 

The filter was struggling with the GL Actual Materials as I didn't mention is was a measure as below, also with values to excludes being blanks.

 

GL Actual Materials = CALCULATE(SUM(Data1[Actual_Amount]) ,Data2[Detail PnL Name]= "Materials")

 

Thanks

 

Nick

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors