Forum Discussion
Issue in filtering
- 1 year ago
Thanks, everyone! Creating a bridge table helped me resolve the issue.
When you face a situation like this—where the visual doesn't use aggregate measures—consider building a bridge table. It allows the correct context to flow through and resolves filtering issues effectively.
Hi chaitanya1 ,
You're facing a common filter behavior issue in Power BI where a table visual goes blank when a date is selected, despite everything else working as expected. This typically happens when there's a default logic hardcoded somewhere (like "yesterday's data") that's clashing with the slicer selection. To handle this correctly, you need a DAX measure that smartly switches between showing yesterday’s data by default and the user-selected date when available. You can create a measure like this:
SelectedOrDefaultDate =
VAR SelectedDate = SELECTEDVALUE(DimDate[Date])
RETURN
IF (
ISBLANK(SelectedDate),
TODAY() - 1,
SelectedDate
)
This measure checks if the user selected a date. If not, it defaults to yesterday’s date using TODAY() - 1. Then, in your table visual, instead of filtering directly on the date column, you apply this logic through a measure like:
SalesForDate =
CALCULATE (
[YourMetricMeasure],
DimDate[Date] = [SelectedOrDefaultDate]
)
Replace [YourMetricMeasure] with your actual measure, such as SUM(Sales[Amount]) or similar. Use this SalesForDate measure in your table visual instead of relying on direct filtering. This way, the table shows yesterday’s data by default and updates correctly when the user selects a date from the filter. If the table is still blank, double-check your relationships, visual-level filters, or confirm the DimDate table includes the date in question.
Best regards,
There is no metrics just columns city from x, date from dimdate, address,notes and installations status from y.
- Bibiano_Geraldo1 year agoSuper User
Hi chaitanya1 ,
Make sure that tables X and Y have rows for the dates you are selecting from DimDate[Date]. If there’s no data in X or Y for that selected date, the table will go blank.
Check also that DimDate[Date] is properly related to the date column in table Y (or X, depending on where your main data lives).