Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have 2 separate tables, connected 1:M via the Test # column. Is it possible to plot them in a single bar visual where the X, Y and Legend are based on the selected value of a Parameter Field? For example, if I select Test Name, it will show the data from the left visual, and if Component Name is selected, it will show the other one.
Sample PBIX: https://file.io/FBmHP0X5zTfV
Test # | Test Name | Test Result | ||
1 | Test A01 | PASS | ||
2 | Test A02 | FAIL | ||
3 | Test A03 | PASS | ||
4 | Test A04 | PASS | ||
5 | Test A05 | FAIL |
Component # | Test # | Component Name | Component Result | ||
1 | 1 | Component A | PASS | ||
2 | 1 | Component B | PASS | ||
3 | 2 | Component A | FAIL | ||
4 | 3 | Component C | PASS | ||
5 | 3 | Component H | PASS | ||
6 | 4 | Component E | PASS | ||
7 | 4 | Component F | PASS | ||
8 | 4 | Component G | PASS | ||
9 | 5 | Component A | FAIL | ||
10 | 5 | Component B | PASS |
Take a look at the attached, pay attention to the model view as I have created a new table and changed relationships along with creating a new measure.
Field Parameters are your friend here, create a new field parameter and drop component and test field in, add a slicer, replace exisiting column axis with the resulting column from the field parameter as your visual axis
The output doesn't seem correct. If you look at the component visual (top right), Component A and Component B do not match with what is shown in the visual with the field parameter. Again, these are coming from different tables. Most of the examples I see online are using the same table.
I tried creating a field parameter for the Axis, Legend and Value fields, but it doesn't seem to show the correct value when selecting the 2nd value (Component Name) in the slicer?
Field Parameters
(FP) Axis =
{
("Test Name", NAMEOF('Test'[Test Name]), 0),
("Component Name", NAMEOF('Component'[Component Name]), 1)
}
(FP) Legend = {
("Test Result", NAMEOF('Test'[Test Result]), 0),
("Component Result", NAMEOF('Component'[Component Result]), 1)
}
(FP) Value =
{
("Tests", NAMEOF('Test'[Tests]), 0),
("Components", NAMEOF('Component'[Components]), 1)
}
Measures
Tests = COUNTROWS('Test')
Components = COUNTROWS('Component')
Visual not showing the correct values (Component Name selected in slicer):
Hi @olimilo
Did ajohnso2 's method solve your problem? If yes, could you please mark it as solution? This will help more users who are facing the same or similar difficulties. Thank you!
If you still have questions, please feel free to ask me.
Best Regards,
Yulia Xu
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
91 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |