Learn about row context error

Francis, Jacqueline 0 Reputation points
2024-10-22T13:56:21.35+00:00

Discount Amount = ( Sales[Order Quantity] * RELATED('Product'[List Price]) ) - Sales[Sales Amount]

I tried this but received this error message: A single value for column 'Order Quantity' in table 'Sales' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

Any solution?

This question is related to the following Learning Module

Community Center Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Syed Saleem Peera 13,060 Reputation points Microsoft External Staff Volunteer Moderator
    2024-10-22T15:30:48.64+00:00

    Hi Francis, Jacqueline,

    Thank you for reaching out to us on the Microsoft Q&A forum.

    We tested the formula on our end, and it is working as expected without any errors. Please refer to the attached screenshots for reference.

    User's imageUser's image

    If you're still encountering the error, please ensure that the relationships between the Sales and Product tables are correctly set up in your data model. Additionally, check for any ambiguity in the relationships that might be causing this issue.

    If you're still facing any difficulties, please share a screenshot of the error along with details on where exactly it occurs, and we'll be happy to assist you further.

    If the information provided is helpful, please Accept Answer and Upvote so that it can benefit other community members.

    Thank you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.