Forum Discussion

Zhinee's avatar
Zhinee
Icon for Helper III rankHelper III
10 months ago
Solved

Power BI DirectQuery: Child table shows exceeds 100,000 row error after adding applying a measure

I have two visuals in a report:

  • Session (parent table)

Joblet (child table)

There’s a 1-to-many relationship from Session → Joblet.

the measure to control filtering and applied to joblet visual:

IsSessionSelected = 
IF(
    ISFILTERED(SESSION_TRANS[Session ID]),
    1,
    0
)

Then I applied a visual-level filter on the Joblet visual:
only show if IsSessionSelected = 1
The idea is that the Joblet table should only show rows when a session is selected.
So if I haven’t clicked any row in the Session visual, the Joblet table should ideally be empty.

However, I’m seeing this error:

Resultset of a query to external data source exceeded the maximum allowed size of 100000 rows.

 

I don’t understand why this happens — it seems like it should just return 0 rows since no session is selected.
However, when I removed this IsSessionSelected = 1, the error disappear and it just show up all the joblets records.

Could someone give me ideas on why this happens and how to fix this?

 

6 Replies

  • Add some more details:

    it worked when I used the built-in relative time filter, Date Search is on Session [start time]

    When I remove the built-in relative time filter, and used my own filter, it starts to break:

    Hours is 4 basically means show the session that is in past 4 hours,(It did filter the session visual but caused error on the joblet visual)

    • v-hashadapu's avatar
      v-hashadapu
      Icon for Community Support rankCommunity Support

      Hi Zhinee , Thank you for reaching out to the Microsoft Community Forum.

       

      When no session is selected, your Joblet visual isn’t receiving any filter context, so it queries all rows in the child table. In DirectQuery mode, this can easily exceed the strict row limits enforced by Power BI, resulting in your error. Applying a measure like ISFILTERED on the parent works only if you use its result as a filter on your child visual. If that's not done, the relationship alone doesn't restrict the Joblet rows to zero, so Power BI tries to fetch everything. Using the built-in relative time filter avoids this because it always enforces a filter on the parent, limiting child visual results.

       

      For best results, explicitly add your measure output (such as IsSessionSelected) as a visual-level filter on Joblet, set to 1. Alternatively, use DAX logic that returns BLANK or restricts results in the child visual unless a session is selected. This proactive filtering is required, otherwise, the visual attempts to retrieve every Joblet row, resulting in performance and row limit errors.

       

      Model relationships in Power BI Desktop - Power BI | Microsoft Learn

      DirectQuery in Power BI: When to Use, Limitations, Alternatives - Power BI | Microsoft Learn

      ISFILTERED function (DAX) - DAX | Microsoft Learn

      • Zhinee's avatar
        Zhinee
        Icon for Helper III rankHelper III

        So I noticed something:
        When I apply the result of IsSessionSelected = 1 to the Joblet visual, it starts to break and shows the “exceeds 100,000 rows” error.

        If I remove IsSessionSelected = 1 from the Joblet visual, the error disappears. Instead, it just shows all the Joblet records.
        (The “Past Hour” slicer filters the Session visual, but it doesn’t filter the Joblet visual — the Joblet visual still shows all records.)