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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I'm trying to create a calculated column or measure that does the following:
I have two tables, a sale table and a saleline table. The Sale table contains 1 line per sale and only has the salevalue, but no product info. The Saleline table contains a more detailed overview and has more lines per sale when more than 1 product is purchased.
For example,
Sale table looks something like:
And for the same sale the Saleline table looks like this:
We are a phone repairshop. Now I want to measure how many sales contain a screen replacement ánd a screenprotector. The code for a calculated column in the Sale table should check for the same SaleID in the Saleline table and check if this is the case with 3 possible outcomes:
- No screen repair
- Screen repair without screenprotector
- Screen repair with screenprotector
I can calculate the amount of screenrepairs using measure:
Hope you can push me in the right direction. Thanks in advance
Solved! Go to Solution.
@BorisTPL You can filter the sales table using the measures you've already created:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@BorisTPL You can filter the sales table using the measures you've already created:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!