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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SNik
Helper I
Helper I

Adding Relations

Hi

I have 2 tables

tblSales ([ProductID] , [Price$])

                   1                250

                   2                400

                   3              1800

you get the idea

 

tblSalesBracket ([Price$] , [BandRange])

                              1          [Less Than 100]

                              2          [Less Than 100]

                               .                  .

                               .                  .

                             498        [400 - 500]

                             499        [400 - 500]

                             500        [Over 500]

 

As you can see i can not use relation for the [Price$] field between the 2 tables becasue the tblSalesBracket ends at 500 but in the tblSales i have more that 500

 

how can i add a relate the 2 fields together, i assume i need to use DAX

and what happens when i use decimals in the tblSales only what would be the solution

Thanks

Sincerely
Nik- Shahriar Nikkhah
1 REPLY 1
Mi2n
Microsoft Employee
Microsoft Employee

You might not need the second table at all. You can create a calculated column in the 1st table, and use the If function to sort out the Price data into the various buckets.

 

So, the calculated column would go something like,

 

Column = IF(tblSales[Price$]<100, "Less than 100", IF(tblSales[Price$]<200,"100-200",... so on))

You get the idea.

 

Regards,

Mi2n

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.