Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next 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

Reply
navith
Frequent Visitor

Need help with DAX query

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.

 

OrderIDOrderDateCustomerIDCustomerNameProductIDProductNameCategoryQuantityUnitPriceTotalAmount

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!!

1 ACCEPTED SOLUTION

Can you share the error of screenshot?

View solution in original post

6 REPLIES 6
navith
Frequent Visitor

Attaching the errorDAX error.png

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.

Kedar_Pande
Super User
Super User

@navith 

The formula you provided is mostly correct, but the error might be due to:

  • If the table or column names in your data model are different, Power BI will throw an error.
  • The column references must exactly match the names in your Power BI data model.

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Can you share the error of screenshot?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.