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.
srlabhe please change the name of table from ICPL3 to your table.
1. Model Assumption:
Date (Snapshot date used by slicer), ID, Name, idnamekey (your comparison key or concatenation)
You also have:
Start Date slicer
End Date slicer
Both slicers filter the same Date column from your view or a Date dimension.
2. Capture Slicer values:
create these two measures:
Start Selected Date =
MIN ( 'Date'[Date] )
End Selected Date =
MAX ( 'Date'[Date] )
3. Base Lookup measures:
this verifies if a row exits
exists at start:
Exists at Start =
VAR _Start = [Start Selected Date]
RETURN
CALCULATE (
COUNTROWS ( ICPL3 ),
ICPL3[Date] = _Start
)
exists at end
Exists at End =
VAR _End = [End Selected Date]
RETURN
CALCULATE (
COUNTROWS ( ICPL3 ),
ICPL3[Date] = _End
)
4. Detect modification
Key At Start =
VAR _Start = [Start Selected Date]
RETURN
CALCULATE (
MAX ( ICPL3[idnamekey] ),
ICPL3[Date] = _Start
)
Key At Start =
VAR _Start = [Start Selected Date]
RETURN
CALCULATE (
MAX ( ICPL3[idnamekey] ),
ICPL3[Date] = _Start
)
5. Final measure - Required column "Change"
Change Status :=
VAR _StartExists = [Exists at Start] > 0
VAR _EndExists = [Exists at End] > 0
VAR _StartKey = [Key At Start]
VAR _EndKey = [Key At End]
RETURN
SWITCH (
TRUE(),
-- Record added in End Snapshot
NOT _StartExists && _EndExists,
"New",
-- Record removed from End Snapshot
_StartExists && NOT _EndExists,
"Deleted",
-- Present in both but data changed
_StartExists && _EndExists && _StartKey <> _EndKey,
"Modify",
-- Present in both and unchanged
_StartExists && _EndExists,
"No Change",
BLANK()
)
6. Build the visual
Column for table:
ID, Name, idbamekey, Change Status
Thanks for you rreply , is it possible to have Change Status as column instead, so that I can filter on it