Forum Discussion

gbarr12345's avatar
gbarr12345
Icon for Post Prodigy rankPost Prodigy
2 years ago
Solved

Couldn't load the data for this visual error

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...
  • vicky_'s avatar
    2 years ago

    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.