Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I am having issues with calculating some data. I have two tables of data.
I've got a Measure with the following formula added into Table 2:
xExtAmt = SUM('Table 2'[Units]) * SUM('Table 1'[SellingPrice])
For the most part it works great, but I've been trying to use some Matrix (Pivot), Card, and Table visuals to calculate some totals and the calculations are WAY off. I'm guessing there is something wrong with what I'm doing here, but I'm not sure what. Between the tables, there is a unique ID field that connects the Unit w/Price and the unique date record of the sale.
I think I may be struggling with what is allowed or not allowed with Direct Query datasets. Any ideas/guidance would be much appreciated. Currently, I'm stuck with a dataset that should be telling me $7.8M, but instead I'm getting $46M. Way off.
Solved! Go to Solution.
Do you really need Direct Query? In any case, what is the relationship between your tables? You likely need an expression like this (assuming you have 1:M (Table2:Table1).
= SUMX( Table2, Table2[Units] * RELATED(Table1[SellingPrice]) )
Pat
Thanks @ppm1. I need the Direct Query to have live data. I don't want to (nor do I have the capacity to) manually perform refreshes and republish things.
The SUMX function does seem to be doing the trick. I've implemented it in one of the two files that I'm working with and it appears to have done the trick in the first one. Haven't had time yet this week to dive in fully on my Power BI projects, but hoping to close the door on this today/tomorrow and continue my progress. Thanks for the support, figured it was something pretty minor. Simple function change. 👍
Do you really need Direct Query? In any case, what is the relationship between your tables? You likely need an expression like this (assuming you have 1:M (Table2:Table1).
= SUMX( Table2, Table2[Units] * RELATED(Table1[SellingPrice]) )
Pat
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
76 | |
74 | |
55 | |
45 |
User | Count |
---|---|
117 | |
106 | |
77 | |
66 | |
65 |