Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
78 | |
40 | |
40 | |
35 |