Forum Discussion
Power BI – Card “Opening” Count Works but Table Rows Do Not Show (Backlog Logic)
- 7 months ago
Excellent question, this is a classic DAX context mismatch problem, and your instincts are actually correct. The issue is not your business logic; it’s how row context vs filter context behaves when you try to reuse a backlog-style measure at row level.
Let’s break it cleanly and then I’ll give you the correct, reliable pattern.
Why the Card Works but the Table Shows No Rows?
The core reason (this is the key)Your Opening Count measure works because:
- It is evaluated once in a pure filter context
- ALL ( Created Date ) removes the slicer
- MIN ( Created Date ) comes from the slicer context
- CALCULATE builds a virtual filtered set of rows
Perfect for aggregation (card)
But the table filter fails because:
SELECTEDVALUE() is the wrong tool here
In a table:
- Each row already has a row context
- But SELECTEDVALUE does NOT read row context
- It only works when exactly one value exists in filter context
Result:
- RowCreatedDate = BLANK
- RowAgreementDate = BLANK
- Your IF condition → always FALSE
- T able returns zero rows
👉 This is expected DAX behavior, not a bug.
Important Rule to Remember:
Row-level filtering must reproduce the same filter logic as the measure — not reinterpret it row by row using SELECTEDVALUE.
Solution:
>> Step1: Create a Boolean-style filter measure (NO SELECTEDVALUE)
---DAX---
Is Opening =
VAR UserStartDate =
CALCULATE (
MIN ( 'Consolidated Grants'[Created Date] ),
ALLSELECTED ( 'Consolidated Grants' )
)VAR SelectedYear =
YEAR ( UserStartDate )VAR ForcedEndDate =
DATE ( SelectedYear, 12, 31 )RETURN
IF (
CALCULATE (
COUNTROWS ( 'Consolidated Grants' ),
ALL ( 'Consolidated Grants'[Created Date] ),
'Consolidated Grants'[Created Date] < UserStartDate,
'Consolidated Grants'[Agreement Signed Date.] >= UserStartDate,
'Consolidated Grants'[Agreement Signed Date.] <= ForcedEndDate
) > 0,
1,
0
)---DAX---
Why this works
The row is filtered naturally
No need to read row values manually
DAX engine evaluates the row inside the same logic as the card
>> Step 2: Use it as a Visual-level filter
---DAX---
Is Opening = 1
---DAX---
Now:
Card count
Table rows
Cross-filtering
Slicers
=================================================================
Did I answer your question? Mark my post as a solution! This will help others on the forum!Appreciate your Kudos!!
Jaywant Thorat | MCT | Data Analytics Coach
Linkedin: https://www.linkedin.com/in/jaywantthorat/
Join #MissionPowerBIBharat = https://shorturl.at/5ViW9
#MissionPowerBIBharat
LIVE with Jaywant Thorat from 10 Jan 2026
8 Days | 8 Sessions | 1 hr daily | 100% Free
Hello Taher28,
Card measure (`Opening Count`):
Uses `CALCULATE + ALL()`, which overrides the Created Date slicer and correctly counts backlog items.
• Row-level flag (`Is Opening`):
Evaluates each row in the current filter context. Since slicers already removed rows, the flag never returns `1`.
The mismatch is because measures can override filters with `CALCULATE + ALL()`, but row-level flags cannot unless you explicitly apply the same override.
Correct Pattern
You have two reliable options:
1. Calculated Column Approach (Recommended)
Create a column that marks backlog rows once per row:IsOpeningRow =
VAR UserStartDate =
CALCULATE ( MIN ( 'Consolidated Grants'[Created Date] ), ALL ( 'Consolidated Grants' ) )
VAR SelectedYear = YEAR ( UserStartDate )
VAR ForcedEndDate = DATE ( SelectedYear, 12, 31 )
RETURN
IF (
'Consolidated Grants'[Created Date] < UserStartDate
&& 'Consolidated Grants'[Agreement Signed Date.] >= UserStartDate
&& 'Consolidated Grants'[Agreement Signed Date.] <= ForcedEndDate,
1,
0
)
• Filter the table on `IsOpeningRow = 1`.
• The card still uses your measure for counts.
2. Measure-Based Table Filter
Instead of `SELECTEDVALUE`, apply the same `CALCULATE + ALL()` logic directly:OpeningTableFilter =
CALCULATE (
COUNTROWS ( 'Consolidated Grants' ),
ALL ( 'Consolidated Grants'[Created Date] ),
'Consolidated Grants'[Created Date] < UserStartDate,
'Consolidated Grants'[Agreement Signed Date.] >= UserStartDate,
'Consolidated Grants'[Agreement Signed Date.] <= ForcedEndDate
)
• Apply as a visual filter (`> 0`) on the table.
• This ensures the table inherits the same override as the card.
ALL function (DAX): Returns all rows in a table or all values in a column, ignoring filters—used to clear filters in `CALCULATE`.
https://learn.microsoft.com/en-us/dax/all-function-dax A
• SELECTEDVALUE function (DAX): Returns the single value in the current context, or an alternate result—commonly used in row-level contexts but still subject to current filters.
https://learn.microsoft.com/en-us/dax/selectedvalue-function-dax B
• ALLSELECTED function (DAX): Keeps external filters while clearing row/column filters—useful for visual totals; included here to clarify context behavior differences vs `ALL`.
https://learn.microsoft.com/en-us/dax/allselected-function-dax C