Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi there,
I'm new to power bi and am trying to write a dax query that shows me that customers based in the north region that haven't purchased paper in the last 90 days.
I wrote the code for the measure and it saved ok when I pressed enter. However when I drag the measure out for a visual I'm getting the following error - MdxScript(Model) (4,1) Calculation error in measure 'Orders'[Customers from North without paper last 3 months]: A table of multiple values was supplied where a single value was expected.
How can I fix this error to show me the data I want to see? Or even is there a better dax query I could use to show what I'm looking for?
The code is as follows and screenshot of error also:
Solved! Go to Solution.
The error message is telling you that you're trying to return a tabl, which isn't allowed (even if the table only has one row and column). The docs for the summarize page says that the return value is a table: https://learn.microsoft.com/en-us/dax/summarize-function-dax
DAX measures only allow you to return a single value.
To fix this, you need to aggregate your CustomerIDs table - so something like:
// ... your code here
RETURN
COUNTROWS(CustomerIDs)
might be what you're after.
Thank you very much!
The error message is telling you that you're trying to return a tabl, which isn't allowed (even if the table only has one row and column). The docs for the summarize page says that the return value is a table: https://learn.microsoft.com/en-us/dax/summarize-function-dax
DAX measures only allow you to return a single value.
To fix this, you need to aggregate your CustomerIDs table - so something like:
// ... your code here
RETURN
COUNTROWS(CustomerIDs)
might be what you're after.