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

If Sales table contains a certain job, then mark Company in another table "Yes"

Hello

 

In my company we have a "Company Info" table and a "Sales" table. Each row of the Sales table is an order line containing Company ID, Job type, revenue and date.

 

We want to track which companies are buying which jobs.

 

Example of tables:

 

Company Table:

 

Company ID
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017

 

Sales Table:

 

Company IDJob TypeRevenueDate
10001A10010-08-2019
10001A10010-08-2019
10001A10010-08-2019
10001B10010-08-2019
10001B10010-08-2019
10001C10010-08-2019
10001C10010-08-2019
10001D10010-08-2019
10001D10010-08-2019
10001E10010-08-2019
10001E10010-08-2019
10001F10010-08-2019
10001F10010-08-2019
10001A10010-08-2019
10001A10010-08-2019
10001A10010-08-2019
10001B10010-08-2019
10001B10010-08-2019
10001C10010-08-2019
10001C10010-08-2019
10001D10010-08-2019
10001D10010-08-2019
10001E10010-08-2019
10001E10010-08-2019
10001F10010-08-2019
10001F10010-08-2019
10001A10010-08-2019

 

For instance, Job type "F" is important for us to track, so if just ANY row in the sales table is the Job Type "F", then mark the Company table with "F"=yes.

 

So ideally input, since Company 10001 is buying Job type F, the company table should say:

 

Company IDF Job
10001Yes

 

 

Possible?

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @PeterStuhr 

 

Of course, it's possible, please find the attached file with the solution included.

You will be able to use the UI for most of the steps, but some manula M interference will be necessary.

In the file, you will see two tables that I have a reference to the Sales table, one contaning original code built with UI and second with manually adjusted M code, I have marked the steps in this table so it's easier to see where you will need to make the adjustments.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @PeterStuhr 

 

Of course, it's possible, please find the attached file with the solution included.

You will be able to use the UI for most of the steps, but some manula M interference will be necessary.

In the file, you will see two tables that I have a reference to the Sales table, one contaning original code built with UI and second with manually adjusted M code, I have marked the steps in this table so it's easier to see where you will need to make the adjustments.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

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.