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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
fab196
Helper II
Helper II

how to fetch the values from the other table even there is no relation between two tables

Hi,

I have two tables nemely the data1 and data2

data1:                                                             

id saleslist
12323
222530
366224
455550
520550

 

data2:

categorystartstop
0-1800180
181-600181600

 

and result i wanted using powwer bi m query language(power query editor) is:

categorystartstoplist
0-180018023
181-600181600224
181-600181600530
181-600181600550

the above table data1 and data2 have no relationship between two table.but based on the data i want to fecth the values from data1 table into the data2 table .

for ex. In my data in data1 table have list column contains multiple values .and i want fetch this values into the data2 table based category column .like in tbale data1 the first row has 23 value in the list field and in the data2 table its among the 0-180 so it will come to the 0-180 category same for the others .if there are duplicates in the data1 list column then distinct will returend.

 

please help

 

@amitchandak 

@parry2k 

 

 

4 REPLIES 4
Greg_Deckler
Super User
Super User

@fab196 Easiest way would be to create a custom column in Table 1 using multiple if then else statements to get the same thing as your Category column in Table 2. Then you could just do a Merge query.

So like:

if [list] < 181 then "0-180"
else if [list] < 600 then "181-600"
else "something else"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

hi,

thnaks for your promp reply but i have found the result using list function but in list if one of the value of column is null then its showing error
like in below data:

startend list
020list
2130list
31 error 

 

the result i wanted is that : for  ex supose start and stop is 0-20 then list fuction giving me a reange of values between 1 to 20 but in the third row of data the end column have one null value .eg for 31-null due to that it is  throwing an error so for that how to i get the list of range between greater than 31 and so on

Hi, @fab196 

Not clear.

Please show the current formula for the custom column you are using or a screenshot of it for further research.

 

Best Regards,
Community Support Team _ Eason

@Greg_Deckler please reply on above comment

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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