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
manoplaeli
Helper II
Helper II

lookup Value for multiple column with range

Hi all, need your help.

What I wanted to do is quite simple which is to add description in another table base on the country name and the amount that fit the proper threshold. I have two tables as below and want to add description in the red box.

 

Screenshot_5.png    Screenshot_6.png   

 

Thank you in advance,

1 ACCEPTED SOLUTION

Try to create a new purchasing amount column:

new_purchasing amount= CALCULATE(SUM('Table'[purchasing amount]),FILTER('Table',EARLIER('Table'[purchasing order number])='Table'[purchasing order number]))

Replace purchasing amount column with the new column in the previous formula.

View solution in original post

4 REPLIES 4
manoplaeli
Helper II
Helper II

@amitchandak This works perfectly, thanks man.

amitchandak
Super User
Super User

@manoplaeli , a new column in table2

 

Table2 = maxx(filter(Table1, Table2[Purchase Amount] >= Table1[Threshhold from] && Table2[Purchase Amount] <= Table1[Threshhold to] ) , Table1[Description])

 

 

@amitchandak one more question. I just realise that the purchasing amount need to be grouped in one Purchasing Order Number before evaluating the threshold level. Screenshot_7.png

 

The coding above is also not filtering the country.

 

Many thanks,

Try to create a new purchasing amount column:

new_purchasing amount= CALCULATE(SUM('Table'[purchasing amount]),FILTER('Table',EARLIER('Table'[purchasing order number])='Table'[purchasing order number]))

Replace purchasing amount column with the new column in the previous formula.

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.