" slicer"
36 TopicsVisuals Break with "Error Fetching Data" When Filtering by Date (Import Mode Model)
Hi everyone, I’m facing an issue in Power BI where visuals break and display an “Error fetching data for this visual – An unexpected error occurred” message whenever I try to apply a date filter (as shown in the attached screenshot). Here are the key details: The data model is in Import mode. The error appears specifically when filtering data on TransactionDate (or any date column). The visuals work fine before applying the date filter. I’ve already tried refreshing the dataset and rebuilding the visual, but the issue persists. Has anyone else experienced this issue or found a solution/workaround for it? Any guidance would be appreciated. Thank you!Solved4.2KViews0likes16CommentsHow to order slicer values by another column within each group of the current column
Hi everyone, I have a table that looks like this: WELL FORMATION DEPTH A B_top 1 A A_top 2 A C_top 3 B B_top 45 B A_top 48 B C_top 50 C B_top 101 C A_top 120 C C_top 135 In Power BI I want to build a slicer for FORMATION. The issue: the slicer always shows the formations alphabetically, but I want them ordered by their depth within each well. I tried creating a Formation_Order column using RANKX, but Power BI gives the error "There can’t be more than one value in Formation_Order for the same value in FORMATION" (because the same formation appears in multiple wells at different depths). What’s the correct way to set up a slicer that respects the per-well depth order? Do I need to build a separate dimension table for slicer values, with WELL + FORMATION combined, and then sort by depth? Or is there a simpler trick to achieve this? Thanks a lot for your help!Custom date slicer with persistProperties commented
I’m currently stuck on a Power BI visualization issue related to bookmarks and slicers, and I have a unique requirement. I have 3 funds: F1, F2, and F3, and I’ve created a Button for each fund. Each fund has 3 different subpages: Overview, Projections, and Portfolio. Each subpage contains visuals specific to that fund. (Attached sample image) I’ve created bookmarks accordingly. However, the problem is with the Date slicer. Since bookmarks preserve the slicer’s state, the date selection is always fixed to what was selected when the bookmark was created. I want the Date slicer to always default to the latest date from the date_dim table, regardless of the bookmark. I tried unchecking the Data option in the bookmark, but that causes other issues. I have hidden slicers that dynamically filter the selected fund when the corresponding button is clicked. Disabling the Data option prevents those fund slicers from working correctly. Each visual should display data only for the respective fund selected. After some research, I found that this is a known limitation in Power BI — you cannot exclude only one slicer (like Date) from a bookmark while retaining others. As a workaround, I explored the idea of customizing a visual, such as the slicer from this GitHub repo: https://github.com/microsoft/powerbi-visuals-timeline I commented out the this.host.persistProperties line to stop it from persisting the selection state. But after building and uploading the custom visual to Power BI, it doesn’t seem to work , is there other way to solve this problem? I need a date slicer with provision to exclude persistent or any different approach to this problemRead slicer values, retrieve corresponding table column values and use them to check existence
Hi all, I am trying to retrieve a column values based on the selected single/multiple slicer values and use those data to check their existence in the other table. Let me put this out clearly. There are two tables i.e., Calendar and Employee data. The calendar has the following columns i.e., fiscal year, fiscal year period, date. Adding the screenshot below. Calendar table: The Employee table has Name, Location, Joined Date. Employee table: The slicer in the Power BI dashboard is added with the 'Fiscal year period' column from 'Calendar' table. If the user selects a particular fiscal period or multiple fiscal periods, the corresponding dates from the Calendar table have to be read in a dax calculation and check the existence of those date values in the Joined date column in the table 'Employee'. For instance, if the user selects 2025 P3 and 2025 P4 from the slicer, then the corresponding dates from 3rd March to 4th May have to be read and check if any of those values exist in the column from other table i.e., in Joined date from Employee table. Could you please help me with a dax calculation/measures for this scenario? Any suggestions will be appreciated. Thanks! Microsoft EnterpriseDNASolved1.2KViews0likes6CommentsSlicer issue - Date slicer issue
Hi Power Bi community, I encountered an issue related to dates while using slicers. When I add the same date data into two slicers, I allow the Date1 slicer to filter the Date2 slicer. In the default state, when I change the range of the Date1 slicer, the default range of the Date2 slicer also changes accordingly. However, if I have already modified the Date2 slicer's range, for example, selecting the time range from 2024/7/1 to 2025/3/11 in Date2, even if I reduce the time range of Date1 to 2024/8/1, the Date2 slicer's range does not change. In fact, with Date2, the time period 2024/7/1 to 2024/8/1 is still selectable. However, when I select any date within this range, the earlier dates become grayed out and unselectable. Is this a bug? If not, could you please advise how I can resolve this issue and ensure that the selectable range of Date2 always aligns with the range selected in Date1? Thanks for any suggestionsSolved915Views0likes2CommentsSorting Data in Different Order Based on Slicer Selection in Power bi
Hi Everyone, I want to sort the data in a specific order. When I select a value in the slicer. Below is the raw data: Table : Year Month Product Amount 2023 1 AA 100 2023 2 BB 200 2023 3 CC 100 2023 4 DD 100 2023 5 EE 300 2024 1 AA 300 2024 2 CC 500 2024 4 DD 600 2024 5 ZZ 300 2024 6 BB 300 slicer : order Required The order in which the products need to be sorted, when we select the year from slicer.Solved2KViews0likes5Comments"Sorting Matrix Data Based on Slicer Selection
Hi Everyone, I want to sort the data in a matrix in a specific order. When I select a value in the slicer, Below is the raw data image : The matrix contains Product and Value [Measure]. Raw Data Slicer : The order in which the products need to be sorted on the year value selected in the slicer. Raw Data: Table Product Year Value P3 2023 100 P2 2023 200 P1 2023 300 P8 2023 40 P6 2023 100 P1 2024 200 P3 2024 300 P2 2024 40 P14 2024 100 P12 2024 200 slicer slicer Year 2023 2024 Order needed Order Required [ when I select year in Slicer ] 2023 2024 Order order P1 P1 P2 P2 P3 P3 P6 P12 P8 P14 BeaBFSolved536Views0likes1CommentCalculating Active Employees from Most Recent Record
Hello, I am trying to analyze workforce metrics over time. I have a fact table that has a record for each time an employee file has changed. It has at least one record for every employee. This table includes unique employee ID, Start date, division, Term Date, Effective Date (when the record was created) and a calculated column of Record Order- which numbers the rows for each employee, with 1 being the first record, 2 being the second and so on. I also have dimension tables for Date, Org Structure (Division/Section) Demographics I need to count active employees at a point in time where Start date <= SelectedDate, TermDate is blank, or > SelectedDate. The issue I am running into is; if an employee has been active in two divisions at different times during the selected period, they are Distinct Counted in each division. This means that the overall organization numbers are accurate, BUT they will count as an employee in each division when that slicer is applied. I need to be able to use just the most recent record for each unique employee- as that most recent record will show their current location. Example Data: PS ID start date Division Term Date RecordOrder Eff Date 1 1/1/2020 A null 1 5/18/2020 1 1/1/2020 A null 2 5/19/2020 1 1/1/2020 B null 3 7/11/2020 1 1/1/2020 B null 4 10/3/2020 2 1/2/2020 A 4/2/2021 1 1/2/2020 2 1/2/2020 A 4/2/2021 2 10/3/2020 3 1/1/2020 A null 1 1/1/2020 3 1/1/2020 B null 2 10/3/2020 In the above data set, using a date slicer on say 10/4/2020, I would want to return a distinct count (3) active employees, 2 in division B. 1 1/1/2020 B null 4 10/3/2020 2 1/2/2020 A 4/2/2021 2 10/3/2020 3 1/1/2020 B null 2 10/3/2020 The first approach I took was to use an 'events in progress' methodology 1. Measure to count all employees based on Start Date 2. Measure to distinct count all active employees at point in time where start date<= selected date, and term date is blank or after Selected date this returns accurate counts for the whole organization- but when appling division slicers, it counts employees as a member of every division they had been active in at any point. So, if someone was in A and later B- they would show up when slicing by A or B. I need to return only the most recent record. The next approach I tried was to identify the MaxRecordOrder of each ID, and filter the active employees measure where RecordOrder=MaxRecord Order: MaxRecordOrder = CALCULATE( MAX(Employee_Fact[RecordOrder]), ALLEXCEPT(Employee_Fact, Employee_Fact[PS ID], 'DateTable') ) Active Employees= VAR EndDatePerVisual = MAX('DateTable'[Date]) VAR RESULT = CALCULATE( DISTINCTCOUNT(Employee_Fact[PS ID]), REMOVEFILTERS('DateTable'), FILTER( Employee_Fact, Employee_Fact[Start Date] <= EndDatePerVisual && ( Employee_Fact[Term Date] > EndDatePerVisual || ISBLANK(Employee_Fact[Term Date]) ) && Employee_Fact[RecordOrder] = [MaxRecordOrder] ) ) RETURN RESULT This approach seems to correctly identify the max RecordOrder for each ID, responsive to the date slicer- but still counts rows where the MaxRecord order <> RecordOrder- so employees are still showing up in counts for multiple divisions! I've also attempted the second approach using the max effective date in place of the RecordOrder calculated column, with no success. Any help would be appreciated!648Views0likes1CommentFilter based on multiple slicer values
I have a two table with below schema Table 1 ID | Name | Value| In Table 1 each ID can have multiple Name and value pairs. So I have combined all Name & Values pairs in Table 2. Table 2 ID | Combined Values Combined values will look like "name1:values,name2:value2". Now I need to support multiple filters on names and values, first drop down for name1 second drop down for value 1 Third drop down for name2 Fourth drop down for value2, Now I need to filter my tables based on these four entries. I need to filter ID's where "name1:values,name2:value2" is present. Can you please suggest on how we can achieve this?Solved975Views0likes4Comments