Forum Discussion
Data to be merged on Visual Level
- Anonymous8 months ago
Hi srlabhe ,
Thank you for your follow-up. The visual appearing blank in this scenario is expected and not an issue with Fabric or Power BI. This happens because the ChangeLabel measure uses SELECTEDVALUE from both the start and end date slicers. If either slicer doesn't have a single date selected, SELECTEDVALUE returns blank, making the measure blank for all rows and causing the table visual to appear empty. This only occurs after the measure is added.
To address this, use disconnected date tables for the start and end date slicers. If the slicers are connected to the main table, data is filtered out before the measure runs, preventing it from accurately determining if a record is new, deleted, modified, or unchanged between snapshots. Disconnected slicers keep the full dataset visible, allowing the measure to compare the two dates directly.
It's also important that the measure never returns blank. It should handle cases where one or both slicers aren't selected and return a meaningful value, so the visual stays visible. When both dates are selected, the measure can then determine the status of each ID. This approach keeps the table from disappearing.
If you want to let users filter by change type (like New or Modified), use a separate measure as a visual level filter instead of relying on the label measure alone. This way, the table remains populated even if no change type is selected.
Thank you.
Improvised Version
Step 1 — Modify ChangeLabel to avoid full BLANK output:
ChangeLabel =
VAR vStart = SELECTEDVALUE(StartDate[Date])
VAR vEnd = SELECTEDVALUE(EndDate[Date])
VAR vID = SELECTEDVALUE('YourView'[ID])
-- If slicers not selected, keep table visible
IF(
ISBLANK(vStart) || ISBLANK(vEnd),
"Select dates",
VAR inStart =
CALCULATE(
COUNTROWS('YourView'),
ALL('YourView'),
'YourView'[SnapshotDate] = vStart,
'YourView'[ID] = vID
) > 0
VAR inEnd =
CALCULATE(
COUNTROWS('YourView'),
ALL('YourView'),
'YourView'[SnapshotDate] = vEnd,
'YourView'[ID] = vID
) > 0
VAR startKey =
CALCULATE(
MAX('YourView'[idnamekey]),
ALL('YourView'),
'YourView'[SnapshotDate] = vStart,
'YourView'[ID] = vID
)
VAR endKey =
CALCULATE(
MAX('YourView'[idnamekey]),
ALL('YourView'),
'YourView'[SnapshotDate] = vEnd,
'YourView'[ID] = vID
)
RETURN
SWITCH(
TRUE(),
inEnd && NOT inStart, "New",
inStart && NOT inEnd, "Deleted",
inStart && inEnd && endKey = startKey, "No Change",
inStart && inEnd && endKey <> startKey, "Modify",
"No Data"
)
)
Step 2 — Add this measure for filtering:
IsInSelectedChange =
VAR sel = SELECTEDVALUE(ChangeType[Change])
VAR row = [ChangeLabel]
RETURN
IF(
ISBLANK(sel),
1,
IF(row = sel, 1, 0)
)
90% of the time, the reason is your StartDate or EndDate slicer has no selection → SELECTEDVALUE is blank → measure returns BLANK → visual disappears
With the updated measure, this problem will solve permanently.
=================================================================
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/
Checklist (VERY IMPORTANT)
Your table will go blank if ANY of these are wrong:
- StartDate slicer must be disconnected table
- EndDate slicer must be Disconnected table
- StartDate slicer selection must be Single date
- EndDate slicer selection must be Single date
- The base table visual includes ID must be Required
- SnapshotDate column exists in same table as ID must be Required
- YourView contains rows matching chosen snapshot dates must be Required
- srlabhe9 months ago
Super User
Its not working as intended for the value for New , looks like belwo condition is failing
inEnd && NOT inStart, "New",