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
matheuswu
New Member

Add category based on a second table

Hello!

 

I am new to Power Query and I am having some trouble with a task. Could anyone give me some advice?

Basicaly, I have Table.1 with products and their relative volume, and Table.2 with categories associated to "volume ranges". I want to associate those categories to the products, as in Table.3.

I checked the possibility of using bucket function, but I don't think it will work because Table.2 ranges can change and I need a fast way to update the categories.

Thanks!!

 

Table.1

ProductVolume
p18
p215
p316
p425
p550

 

Table.2

Categorymin volmax vol
A010
B1020
C2030
other30100

 

Table.3

ProductVolumeCategory
p18A
p215B
p316B
p425C
p550other
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @matheuswu 

Please check the below picture and sample pbix file's link down below, whether it is what you are looking for.

All measures are in the sample pbix file.

 

Picture2.png

 

https://www.dropbox.com/s/wdv3hmwdgz2yfkb/matheuswu.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @matheuswu 

Please check the below picture and sample pbix file's link down below, whether it is what you are looking for.

All measures are in the sample pbix file.

 

Picture2.png

 

https://www.dropbox.com/s/wdv3hmwdgz2yfkb/matheuswu.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


That's it! Thank you very much!

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.