Forum Discussion
Filtering help
- 1 year ago
Hi BicBiro ,
You can accomplish this in DAX by creating a new Calculated Table. This approach generates a filtered version of your data based on the multi-step logic you need: first finding the groups that use a specific tool, and then showing all data for those groups.
Here is the DAX expression you would use. Simply replace 'YourTable' with the name of your actual data table and "Tool Y" with the specific tool you wish to filter by.
FilteredTable = VAR TargetGroups = CALCULATETABLE ( VALUES ( 'YourTable'[GROUP] ), 'YourTable'[TOOL] = "Tool Y" ) RETURN FILTER ( 'YourTable', 'YourTable'[GROUP] IN TargetGroups )This DAX code works by first creating a temporary variable named TargetGroups. This variable holds a distinct list of all groups that have at least one entry associated with "Tool Y". The RETURN statement then executes the main logic, which iterates through your original table and keeps only the rows where the group name is found within the TargetGroups list created in the first step. The result is a new table in your data model that contains the complete tool usage for only the groups that meet your criteria.
Best regards,
Hi BicBiro
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.