Forum Discussion
Aggregate string into groupings based on filter selection
- 1 year ago
Hi jos818
In the query editor, I would add an index column which will serve as a reference to the original rows prior to adding a column that splits diagnosis into several rows for each semicolon
The steps above will result to the table below.
Notice that index 11 repeats 3x so the measure to total the views should take this into consideration.
Total Views = SUMX ( VALUES ( 'Table'[Index] ), CALCULATE ( MAX ( 'Table'[Daily views] ) ) )Please see the attached pbix.
jos818 You can try to Split column and create a new separate table
Split the Diagnosis Column: First, you need to split the Diagnosis column into individual diagnoses. This can be done using Power Query.
Create a Relationship: Create a relationship between the split diagnoses and the original table.
Create a Measure for Summing Views: Create a measure that sums the Daily views based on the selected keyword.
Create a Slicer: Use the new column with individual diagnoses as a slicer.