filter
379 TopicsHow to handle two date conditions on the same chart while keeping visual interaction in Pow
Hello, I have been trying for several days now to solve an issue in my Power BI report. Context: I am analyzing ticket creation, resolution date, and compliance for a client. How: I determine whether tickets fall within the scope of the analysis by applying several filters: ticket type resolution date a date range status Why: Once the tickets meet these criteria, my measure returns "OK" if they are compliant, or "KO" if they are not. Requirements: First, I need to check that tickets are in "Authorized" status and that their [duedate] is earlier than the date selected in the filter. Second, I need to check that tickets are in status ("Qualified" OR "Closed") and that [duedate] falls within a date range selected in the filter. Additional constraints: Both KO and OK tickets must be displayed on the same chart. There must be only one single [duedate] date filter on the report page. The chart must remain interactive with the table showing the ticket details within the analysis scope. In other words, when I click on the "KO" slice in the chart, only KO tickets should appear in the table. Same for OK tickets. Here is the formula with the date filters included, just to illustrate the logic: C1 = IF( AND( OR( NOT(AND( 'TABLE'[statusName] = "Authorized", 'TABLE'[duedate]<=DATE(2025,12,15) )), 'TABLE'[statusName] IN {"Technically qualified", "Operationally qualified", "Closed"} && NOT(ISBLANK('TABLE'[TQ_StatusDate])) && 'TABLE'[duedate] >= DATE(2025,09,01) && 'TABLE'[duedate] <= DATE(2025,12,15) ), 'TABLE'[TQ_StatusDate]<='TABLE'[duedate] ), "OK", "KO" ) Problem: If I filter on the interval from 2025-09-01 to 2025-12-15, the first part of my formula is no longer exhaustive, because for that part I need to include everything before 2025-12-15, not just what falls inside the selected interval. I managed to work around this by using the ALL() function (to remove the date constraint) in order to count tickets matching the criteria and display them in a single chart, but this only gives me aggregated counts and removes the interaction with the detail table. Thank you in advance for your help. CharlesSolved1.1KViews1like7CommentsCreate Company/Project Hierarchy and show Projects at their respective level
Hello, I have 2 tables: Company table, where a Parent Company ID filed is pointing to a record in the same table. Project table where each Project is executed by a Company. I want to create a filter where I put the Companies and it shows by Hierarchy level, then under each Company there will be the Projects associated to it and the Companies under it if there's any. I tried iteration of PATH(), PATHLENGTH(), and PATHITEM() and got close results. Result needed in the filter: - Company X - Company A - Company D - Project Z - Company B - Project V - Project U - Company C - Company E - Project P Attaching some sample data. Companies CompanyID,CompanyName,ParentCompanyID 1,Global Holdings, 2,North America Division,1 3,Europe Division,1 4,Asia Division,1 5,US Subsidiary A,2 6,US Subsidiary B,2 7,Canada Subsidiary,2 8,EU Subsidiary A,3 9,EU Subsidiary B,3 10,Germany Ops,8 11,France Ops,8 12,Asia Subsidiary A,4 13,Asia Subsidiary B,4 14,Japan Ops,12 15,Korea Ops,12 16,Australia Region,4 17,Sydney Office,16 18,Melbourne Office,16 19,UK Ops,9 20,London Office,19 Projects ProjectID,ProjectName,CompanyID,ProjectStatus,StartDate,EndDate 1,Project Alpha,2,Active,2023-01-01,2023-06-30 2,Project Beta,2,Completed,2022-05-01,2022-10-31 3,Project Gamma,3,Active,2023-03-01,2023-09-30 4,Project Delta,3,On Hold,2023-02-01,2023-07-31 5,Project Epsilon,5,Completed,2021-07-15,2021-12-31 6,Project Zeta,6,Active,2023-01-15,2023-07-15 7,Project Eta,7,On Hold,2022-10-01,2023-04-30 8,Project Theta,8,Active,2023-04-01,2023-09-01 9,Project Iota,9,Completed,2022-01-01,2022-06-30 10,Project Kappa,10,Active,2023-02-01,2023-08-31 11,Project Lambda,11,On Hold,2022-08-01,2023-02-28 12,Project Mu,12,Active,2023-03-01,2023-08-31 13,Project Nu,13,Completed,2021-12-01,2022-05-31 14,Project Xi,14,On Hold,2023-06-01,2023-12-31 15,Project Omicron,15,Active,2023-04-01,2023-09-30 16,Project Pi,16,Completed,2022-02-01,2022-07-31 17,Project Rho,17,Active,2023-01-01,2023-06-30 18,Project Sigma,18,Completed,2022-09-01,2023-03-31 19,Project Tau,19,Active,2023-02-01,2023-07-31 20,Project Upsilon,20,On Hold,2023-01-15,2023-06-15 21,Project A1,5,Active,2023-03-01,2023-08-01 22,Project B1,6,Completed,2022-05-15,2022-11-30 23,Project C1,8,On Hold,2023-07-01,2023-12-01 24,Project D1,9,Active,2023-01-10,2023-07-10 25,Project E1,12,Completed,2021-10-01,2022-04-30 26,Project F1,13,Active,2023-04-10,2023-10-01 27,Project G1,14,Completed,2022-12-15,2023-05-30 28,Project H1,15,Active,2023-05-01,2023-11-01 29,Project I1,16,On Hold,2022-06-01,2022-12-15 30,Project J1,17,Completed,2022-03-01,2022-08-15 31,Project K1,19,Active,2023-04-01,2023-09-15 32,Project L1,20,On Hold,2023-05-15,2023-10-01 33,Project M1,5,On Hold,2023-01-01,2023-06-30 34,Project N1,6,Active,2023-04-01,2023-09-01 35,Project O1,9,Completed,2021-07-01,2022-01-31 36,Project P1,12,Active,2023-02-01,2023-08-31 37,Project Q1,13,On Hold,2022-11-01,2023-04-01 38,Project R1,14,Active,2023-01-01,2023-06-30 39,Project S1,16,Completed,2022-08-01,2023-01-15 40,Project T1,18,Active,2023-03-01,2023-08-31 41,Project U1,8,Completed,2022-04-01,2022-09-30 42,Project V1,10,Active,2023-05-01,2023-10-01 43,Project W1,11,On Hold,2023-02-01,2023-07-31 44,Project X1,19,Completed,2022-09-01,2023-03-31 45,Project Y1,17,Active,2023-01-10,2023-06-30 46,Project Z2,3,On Hold,2023-07-01,2023-12-01 47,Project Z3,2,Completed,2022-08-15,2023-01-15 48,Project Z4,6,Active,2023-02-01,2023-07-30 49,Project Z5,7,Completed,2022-10-15,2023-04-01 50,Project Z6,8,Active,2023-01-15,2023-06-15 Thanks in advance for the support.Solved1.8KViews3likes7CommentsFiltering text with > or <
I have software version information like version 11.0.2 and 11.0.10. If I want to filter to all versions 11.1.0 or later I don't see a good way to filter. Yes, I have broken it into three pieces major, minor, and patch, but for these two version examples when sorting as text 11.0.10 is actually earlier than 11.0.2 (as a string "10" < "2") My solution was to left pad each piece to 3 characters so that the version looks like 011.000.010 and 011.000.002 which works great for sorting, but not for filtering because I don't see a > or < operator, only for numeric values, only things like "contains" and "blank", etc. So what's my best option? Thanks!Solved987Views0likes5CommentsMeasure as a slicer
I have three tables in my Power BI model: Sales Order Fact Order Date Customer All these tables are properly connected. I’ve created a few DAX measures based on them: Number of Customers with Order amount > $100 Number of Customers with Order amount ≤ $100 The amounts are grouped Year-to-Date (YTD). So if the user selects August, the total amount is calculated from January 1st to August 31st. All calculations are working correctly. However, I now need to create a slicer to allow users to filter between "> $100" and "≤ $100". This is where I'm stuck. I created a measure-based flag, but I have to manually apply the filter to each visual — and this report has many visuals. Also, I’m unable to apply the measure as a filter on Card visuals, which is a limitation. Is there any alternative approach to creating a slicer that dynamically filters visuals based on "> $100" or "≤ $100" orders? Expected output The Customer table contains fields such as Name, Address, and customer Number. The Order Date table is a standard date dimension with fields like Order Date and Month, Year. The Sales Order Fact table includes details like Order Amount, Quantity, and other transaction-level data. The report includes multiple visuals — such as cards, tables, bar charts, and several slicers. I want to implement a filter where: If the user selects "> 100", the report should display data only for customers whose total order amount is greater than $100. If the user selects "≤ 100", the report should show data only for customers whose total order amount is $100 or less. This filter should apply across the entire report to all visuals consistently.Solved1.7KViews1like7CommentsMy Matrix Table Keeps Showing More than X rows despite Measures - How to fix?
Hi - Currently my table (named Overview) is displaying Sites (via distinct site table) and Customers (via distinct customer table) as the Matrix Table's rows and the overall store sales + top 5 customer sales (depending on the time period picked). Data sheet hyperlink PBIX file hyperlink I'm experiencing a problem where: 1. I can't seem to make a Top/Bottom 20 stores slicer (based off sales) 2. Adding Date columns to my Matrix Table rows removes my top 5 Customers row condition and instead shows 6 or more customer rows/exceeds query resources To illustrate what i'm doing currently - I made the table's sales value by these measures: Total Sales = SUM( Overview[Sales]) Then i used this measure as the Matrix Table value: MEASURE-SALES = IF( ISINSCOPE( 'Unique Customers'[Customer] ), [Total Sales], CALCULATE( [Total Sales], REMOVEFILTERS( 'Unique Customers'[Customer] ) ) ) As mentioned before - i also made the table show each store's top 5 customers via this rank: Customer Rank = VAR BaseTable = ADDCOLUMNS( CALCULATETABLE( SUMMARIZE( Overview, 'Unique Customers'[Customer], 'Unique Stores'[Store] ), REMOVEFILTERS( 'Unique Customers' ) ), "@val", [Total Sales] ) VAR Result = RANK( SKIP, BaseTable, ORDERBY( [@val], DESC ), PARTITIONBY( 'Unique Stores'[Store] ) ) RETURN Result then i set this measure as = 1 in the table's filter Customer is visible = VAR CustomerRank = [Customer Rank] VAR Result = IF( ( CustomerRank <= 5 && NOT ISBLANK( CustomerRank ) ) || NOT ISINSCOPE( 'Unique Customers'[Customer] ), 1 ) RETURN Result My date table is below for reference (capped at current month for YOY measure purposes not mentioned above): Date = ADDCOLUMNS ( CALENDAR ( DATE (2023, 1, 1), DATE (2025, 4, 30) ), "Year", YEAR([Date]), "Year-Month", FORMAT([Date], "yyyy-MM"), "Year-Month sort", EOMONTH([Date], 0) ) Would like if there was a test file sample on this if possible as i keep getting stuck/written measures i recieve return an error- the common problems i'm running into for 2. as mentioned before is: - Query exceeds resource when Year-Month is added - Rows exceed 5 customers when "Year" column is added / time range on slicer is picked529Views0likes1CommentFiltering ALL Tabs of a report by URL Query Parameters
I have read the various help articles around using URL Query Parameters to Filter a Report. It only seems to apply to A report section though, and not the report in it's entirety. Is there a way to filter the entire report, so that if a user lands on one Report Section and navigate to another, the same filter persists? Filter a report using query string parameters in the URL - Power BI | Microsoft LearnSolved1.4KViews0likes4CommentsRLS filtering based on sub-group membership
Hi and glad to add more info if it helps (as with many, I can't share precise data so I apologize in advance). I have 2 huge tables: AllUserRaw - contains a lengthy list of AD Service accounts with a column of "supportgroup" among others (lots of other columns of info that would interest the owners). That SupportGroup column contains the Service Now support group name per account. It also has a dedicated owner "OwenerSamAccountName" in addition to the support group: SamAccountName SupportGroup OwenerSamAccountName serviceAccountABC HelpdeskGroup fred serviceAccountZYX HelpdeskGroup jane serviceAccountQWE Janitors tom ... ... ... SnowGroups - is a dump of Service Now that has columns "groupname" and the member's "usernames". Each group is enumerated and shows the username in each group: GroupName Username HelpdeskGroup fred HelpdeskGroup sally Janitors mcrib Janitors fillet ... ... The issue in a nutshell: users connect to the dashboard using RLS and it works well to display the rows where they are the "direct owner" from the "AllUserRaw" table (this is easy to use RLS to match the UserPrincipalName to the Owner column). The issue is that if the logged in users is not a direct owner, we still want to display the rows from the Raw Users if they are a member of a support group. (In this example, Sally cannot see any rows because they are not the direct owner yet they are a member of the support group so they still should) What I tried: I tried linking the 2 tables together in the model by the "groupName" but that throws a "many to many" error as each table has many duplicate values. (eg many service accounts can have the same support group and then the support group table has many people in the same group). I tried using a DAX created bridge table between them but the issue still exists that if Sally connects, the bridge doesn't work correctly and displays nothing. I also tried creating a dynamic table using USERPRINCAPLNAME() that would only show support groups of the viewing user but PBI doesn't let you do that in dynamic tables. What I'm after: I don't mind 2 separate table visuals if it helps/matters: 1 for the "direct view" and the other for "support group view". If there was a filter/DAX way of doing a "reverse lookup" to say "if you're a direct member OR you're a member of a support group attached to that account" then show those rows. (eg filter on snowgroups based on who's logged in, get the unique group name(s) they are a member of as it could be many, and then for each group name, display the associated accounts to those groups) I hope I'm just overthinking this but I'll try and answer any questions. Thanks in advance!Solved1.1KViews0likes6CommentsFilter two tables on Multiple Criteria
Hello! this might be confusing and I can't share any data so I will do my best! I have two tables: SynthesizedItems and Failures. I have a report page dedicated to fail rate. This is just the number of fails/number of synthesized items. (measures in the failure table) Originally, I linked the two tables to a common date table. this allowed me to see the fail rate adjusted based on the users filtering by date. Then, I realized I needed to be able to break this down further. I added an additional table called DepartmentFilter and linked it to department in both the fail and synthesis tables. this seems to work. Now my question. My report has SEVERAL factors involved that users can slice their data by (all coming from the failure table) and I noticed that if the user filters to a certain customer, the fail table will filter but not the synthesized items table. (makes sense because they are not related, although customer exists as a field in both tables). Is it possible to make this method work where any filter the user applies will affect BOTH tables and therefore give an accurate rate? Is there a limit to how many common "filter" tables I can create and link to both? Is there a way to do it other than creating tables for each field? really trying to avoid this since it would be about 10 fields.1.6KViews0likes9CommentsHelp with FIFO logic with two Tables in DirectQuery
Hello, I'm struggling with creating a way to measure and/or visualize if a Load Unit that has been delivered to us, was also unloaded first. Deliveries have Priority 1-3 so what we want is, that the first delivery arrived is also the one that is unloaded first. I'm stuck with working in DQ and have to tables to do this- Transports Table and Unloading Table Transports Table has the Columns LoadUnitId, Priority and ActualArrival Timestamp. Unloading Table has the column StarTime Unloading. Something like this: LoadUnitId Priority ActualArrival StartTime Unloading 1234 1 01.01.2025 08:00 01.01.2025 08:15 4321 2 01.01.2025 07:35 01.01.2025 07:56 2134 1 01.01.2025 07:15 01.01.2025 08:19 What kind of expression can be used to check if a Load Unit that has the same priority, was delivered before another one, but unloaded later. I've been thinking of using Ranks but DirectQuery is a bit tricky and won't allow that. Maybe Flags would do the trick but I'm unsure how to use them in this case exactly. Any help would be highly appreciated. Thank you very much 🙂843Views0likes6CommentsMeasure based on Multiple Slicer Selection
Hello! I have a measure to calculate fail rate. Right now it is actually a couple of measures: one counting all the fails, one counting the total items, and a third that does the calculation to turn the first two into a fail rate. What I need to be able to do is have the users select their departments in the slicers and have the measures change to only calculate the fail rate for those departments. I have found a solution using IF ISFILTERED and SELECTED VALUE if(ISFILTERED(ALL_Fail_History[SynthDept]),'Synthesized Items'[synthDept]=SELECTEDVALUE(ALL_Fail_History[SynthDept]) but this solution doesn't seem to work when multiple departments are selected. This is necessary for my use case. Any ideas on how to get this to work even if two or more values are selected in the SynthDept filter?Solved1.7KViews0likes6Comments