The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a table visualisation that looks similar to the below, where records with errors have a value of 1.
Record ID | Error |
1234 | 1 |
1235 |
|
1236 | 1 |
I have a bar chart that contains the error field as a count. I want to be able to click on the bar and then only show the rows with errors in the table. I have tried using edit interactions and selecting filter, but this doesn’t change anything. Am I missing anything?
Solved! Go to Solution.
Alright then, I believe what you would need to do is to put the error field on the "legend" well of the bar chart, and select the error field you want on the legend:
Versus just selcting the column:
Othen than this I got nothing, would be interested to know if anyone has a workaround where selecting the column highlights all the values, not just the "row" it belongs to.
Hello,dlopesc04 ,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@Laura_May .I am glad to help you.
like this?
When the toolbar is clicked, all rows with [Error] column = 1 are displayed in the table.
When I click on the Error column in the first bar, only Record IDs 1234 and 1236 are shown in the table on the left (they correspond to the value Error)
And when I click on the bar below, I can realize highlighting (when I click on the bar Record ID=1234 data), the left table is equivalent to the Record ID=1234 filtered, only display Record ID =1234 data rows!
Both of the above cases are actually cross-filtering and highlighting effects between different visuals.
URL:
Understand how visuals interact in a report - Power BI | Microsoft Learn
If you want to realize the effect of the first one, you can refer to my test below
1. Creating a measure that displays part of the null value as a marker.
For some value=blank data rows in power BI, power bi will ignore them by default and not display them when they are aggregated in visual (because the value is empty, and there is no point in aggregating the empty values), it is better to create an auxiliary measure, modify its empty values, and display them in visual.
The measure specifies that if the value is null, it is assigned to an empty string, which will successfully allow Record ID = 1235 data in the [Error] column aggregation is also displayed (measure defaults to the state of aggregation, the result is a scalar value)
2. Create a grouped calculated column
In order to display all rows of data with an error column status of 1 together in the table, you need to group all the data with an error column = 1 into one group (create a calculated column that acts as a marker for the columns that need to be physically present, and place them in the sort axis)
Like this:
3. Create a separate tool bar chart that triggers cross-screening of all Error = 1 data in the table.
4. To achieve the effect: the system automatically determines the classification axis has a hierarchical structure, you click on the first level (IF Error), at this time all Error = 1 data will be cross-screened out!
Like this:
I have also shared the pbix file of my test, I hope my test is helpful to you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It is difficult to say for sure without taking a look at your model. What fields are on the bar chart? If they are from different tables is there a relationship between them?
The bar chart just contains the error field as an implicit measure. This is the same field as the error column on the table visualisation.
Alright then, I believe what you would need to do is to put the error field on the "legend" well of the bar chart, and select the error field you want on the legend:
Versus just selcting the column:
Othen than this I got nothing, would be interested to know if anyone has a workaround where selecting the column highlights all the values, not just the "row" it belongs to.
Thank you - this works. I now have more than 1 error column. Is there a way of achieving this with multiple fields? I can only add one field to the legend.
@Laura_May You should structure you table so that any other values you would like to be shown in this legend are also on the "error" column, if you're not too familiar with that this link may help you:
https://medium.com/@cherifal2011/normalization-and-denormalization-in-power-bi-295d4dfbf3ab
Basically you should only have one error column, and will probably have to pivot/unpivot your data in Power Query at some point; Same data point has two or more errors? Two rows on the table, one for each error ID, and you have a dimensional table containing all the Record IDs related to you fact table, and that is the field you'll use in any visual.