Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello everyone,
I am a beginner to PowerBI and was exploring a few basic DAX queries.
In my excel work book (named data), I have the following columns and I would like to calculate the total amount based on the category.
| OrderID | OrderDate | CustomerID | CustomerName | ProductID | ProductName | Category | Quantity | UnitPrice | TotalAmount | Region |
I used the following formula based on the suggestion of Co-pilot however, it seems to throw an error. What could be the error and how do I rectify this?
TotalAmountByCategory =
CALCULATE(
SUMX(
'Sheet1',
'Sheet1'[Quantity] * 'Sheet1'[UnitPrice]
),
ALLEXCEPT('Sheet1', 'Sheet1'[Category])
)
Feedback will be really helpful.
Thanks!!
Solved! Go to Solution.
Attaching the error
I believe you are executing the query in the DAX Query view. Kindly create the same logic as a new measure and include it along with the Category.
Is this issue resolved?
I tried however, the error was the same.
The formula you provided is mostly correct, but the error might be due to:
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Can you share the error of screenshot?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |