Skip to content

Adding Table Relationships causes We couldn't fold the expression to the data source. error #10

@sgrebnov

Description

@sgrebnov

With relationships defined between tables, Power BI uses the following DAX query that fails with error

OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source. Please try a simpler expression..

Image Image
DEFINE
    VAR __DS0Core =
        SUMMARIZECOLUMNS(
            ROLLUPADDISSUBTOTAL('product'[productnumber], "IsGrandTotalRowTotal"),
            "Sumorderqty", CALCULATE(SUM('order_details'[orderqty]))
        )

    VAR __DS0PrimaryWindowed =
        TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'product'[productnumber], 1)

EVALUATE
    __DS0PrimaryWindowed

ORDER BY
    [IsGrandTotalRowTotal] DESC, 'product'[productnumber]
Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions