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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
AFra
Helper III
Helper III

Group values based on another table

Hi all, 

 

I have a table with a list of salaries (Table A.), and another table with the categories I'd like to add (Table B.) 

Table A. 

IdpersonSalary
5792714 669,47 €
6358410 616,88 €
6358120 584,60 €
4846010 712,40 €
5654210 712,38 €
4846015 550,85 €
8060913 297,22 €
8060911 617,99 €
4351716 938,55 €
4351722 256,46 €
454506 477,12 €
4351713 533,18 €
4351712 139,92 €
4351715 365,90 €
9872210 408,80 €
9872210 712,40 €
9676816 263,52 €
9845113 993,00 €
10103710 617,36 €
9931813 261,92 €
9677116 720,08 €
9677114 348,54 €
9677115 082,08 €

Table B. 

Rev ménage (groups)MinValMaxValORDRE
< 5.000 €-10004999,99991
5.000 - 10.000 €50009999,99992
10.000 - 12.500 €1000012499,99993
12.500 - 15.000 €1250014990,99994
15.000 - 20.000 €1500019999,99995
20.000 - 25.000 €2000024999,99996
25.000 - 30.000 €2500029999,99997
30.000 - 40.000 €3000039999,99998
40.000 - 50.000 €4000049999,99999
> 50.000 €5000010000000010
(Blank)  11

 

So that I can have : 

IdpersonSalaryRev ménage (groups)
5792714 669,47 €12.500 - 15.000 €
6358410 616,88 €10.000 - 12.500 €
6358120 584,60 €20.000 - 25.000 €
4846010 712,40 €10.000 - 12.500 €
5654210 712,38 €10.000 - 12.500 €

 

How can I tell that power bi ? It's a sort of lookupvalue but that takes in account the max and min value. 

Any ideas? 

Thanks in advance! 

 

Ana 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @AFra 

 

The two articles below will explain the solution to your requirement.

https://www.daxpatterns.com/dynamic-segmentation/

https://www.daxpatterns.com/static-segmentation/

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

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @AFra 

 

The two articles below will explain the solution to your requirement.

https://www.daxpatterns.com/dynamic-segmentation/

https://www.daxpatterns.com/static-segmentation/

Best Regards,
Mariusz

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

Please feel free to connect with me.
Mariusz Repczynski

 

Thanks @Mariusz , it works nicely : ) 

 

Car revenus ménage = CALCULATE(
                VALUES('cat revenus'[Rev ménage (groups)]) ;
                FILTER('cat revenus';
                            data[Rev ménage]>='cat revenus'[MinVal]
                            && data[Rev ménage] < 'cat revenus'[MaxVal]
                 )
)
Mariusz
Community Champion
Community Champion

Hi @AFra 

 

Happy to help!

 

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.