Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone
I have a report in direct query.
Consider I have 2 tables(table1 and table2) which both have a column that contains stock items. The relation is one to many.
how can I calculate Table1[Qty]*Table2[Price] for each Stock item? (I did it by creating a measure but when I use Card, the filters doesn't apply on it , but in a table, it works perfect)
Solved! Go to Solution.
@Matt_Gol , As suggested by @Luuky Try SUMX with related. If there is 1-M relationship between Table 2 to table 1 it should work
example
Sumx(Table1, Table1[Qty]*related(Table2[Price]))
if not then you might have do more work
example
Sumx(Table1, Table1[Qty]*Maxx(filter(Table2, Table[Item] = Table2[Item]) , Table2[Price]))
you can more conditions in second one as per need
@Matt_Gol , As suggested by @Luuky Try SUMX with related. If there is 1-M relationship between Table 2 to table 1 it should work
example
Sumx(Table1, Table1[Qty]*related(Table2[Price]))
if not then you might have do more work
example
Sumx(Table1, Table1[Qty]*Maxx(filter(Table2, Table[Item] = Table2[Item]) , Table2[Price]))
you can more conditions in second one as per need
Hi @Matt_Gol ,
Try Sumx for it in a measure. If thats not working then I need some visualisation of the tables and how they are related.
Greetings,
Luuk
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
217 | |
89 | |
82 | |
66 | |
57 |