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
PeterStuhr
Helper V
Helper V

Count number of companies NOT ordering certain jobs

Hi all!

 

I have a company table with company data, and a turnover table with all our sales lines including what job type it is.

 

I am interested in how to calculate number of companies BUYING a certain job type.

And how to calculate number of companies NOT BUYING a certain job type.

So I can make some percentage measure.

 

Data could look like this.

 

Company table:

CompanyID
1
2
3

 

Sales table:

CompanyIDJobIDJobTypeID
111
121
131
142
151
262
272
282
291
2101
3111
3121
3131
3141
3151
3161
3171
3181
3191
3201

 

thanks!

1 ACCEPTED SOLUTION
PeterStuhr
Helper V
Helper V

Fixed.. I just made a calculated table in the company table:

 

Special jobs = CALCULATE(DISTINCTCOUNT(FactTurnover[TurnoverJobId]);FactTurnover[TurnoverJobTypeId]=1|| FactTurnover[TurnoverJobTypeId]=2||)
 
Everyone blank are the ones I am looking for

View solution in original post

1 REPLY 1
PeterStuhr
Helper V
Helper V

Fixed.. I just made a calculated table in the company table:

 

Special jobs = CALCULATE(DISTINCTCOUNT(FactTurnover[TurnoverJobId]);FactTurnover[TurnoverJobTypeId]=1|| FactTurnover[TurnoverJobTypeId]=2||)
 
Everyone blank are the ones I am looking for

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.