Forum Discussion

KevinDavis338's avatar
KevinDavis338
New Member
1 year ago
Solved

Why does my date slicer break my table visual with “Error fetching data for this visual”?

I’ve got a clean Excel file imported into Power BI Desktop. All the fields (like Transaction Date, Debit, and Credit) are properly formatted — no nulls, no text in number columns, no weird headers.

I created a table visual with just Transaction Date and a few values. When I add a slicer using Transaction Date and move the start date, I get the dreaded:

“Error fetching data for this visual”

But here’s the kicker — when I move only the end date, it works.

I tested for errors in Power Query with 1 / [Debit] — no issues. No rows with nulls or blanks.

I’m using the flat date field (not a hierarchy), and I’ve even reconnected the data source to the correct worksheet — not a named table.

Is Power BI just allergic to a specific row in my date range? What causes this error if the data is 100% clean?

7 Replies

  • Hi KevinDavis338,

    Please check if any missing relationsips between date and fact tables.

    Check out any measure calcualtion errors.

    Check if Power bi hidden date tables can cause slicer issues.

    Check dates columns are with correct data types.

     

    If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

     

    Best Regards, 

    Maruthi 

    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

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

    Hi KevinDavis338 ,

    Thank you for reaching out to the Microsoft Fabric Community forum.

     

    Please check below workarounds to fix the issue.

    1. Even if dates appear clean, Excel can sometimes store a value as a number or text that Power BI interprets incorrectly. In Power Query, confirm Transaction Date is explicitly Date type, not Any or Text. Sort the column ascending in Power Query or a table visual and check for Unusually old dates (1900-01-01) and Very recent future dates (2099). Blank or nulls that appear as minimal dates (1899-12-30)

    solution: Fix with below code in Power Query

    = Table.SelectRows(#"PreviousStep", each [Transaction Date] >= #date(2000, 1, 1) and [Transaction Date] <= DateTime.LocalNow())

    2. Power BI slicer triggers a query using the selected date range. If the underlying data model or relationships break under certain conditions (missing or disconnected data in part of the range), the visual can fail.

    Solution: Try creating a Calendar Table and relate it to Transaction Date. Then use the Calendar’s Date field in the slicer. This ensures consistent filtering.

    Calendar = CALENDAR(MIN(YourTable[Transaction Date]), MAX(YourTable[Transaction Date]))

    3. Using a slicer might push the query in a way that breaks folding, especially for Excel sources, causing unexpected failures.

    Solution: Load the data as an actual Excel Table instead of just worksheet range. Ensure all Power Query steps preserve folding (check with “View Native Query”). Avoid using calculated columns or non-foldable transformations in Query Editor.

    4. Sometimes the issue is just a corruption in the visual cache or report.

    Solution: Delete and recreate the table visual and slicer, Save and reopen Power BI Desktop and clear cache.

    5. Even if the column is typed correctly, Power BI might misinterpret Excel’s regional format.

    Solution: In Power Query, Add a new column with below code.

    = Date.FromText(Text.From([Transaction Date])) Or ensure consistent locale.

     

    If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
    Thank you.