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
Hello, I'm having trouble creating a line and stacked bar chart. Here's the scenario: I have three tables with some common columns, and each table has an "LP" column indicating the location of the data. The LP columns in the tables contain BR, LR, and LB, respectively. My goal is to use these three columns as slicers. I found a suggestion in the Power BI community, which is:
Plant = DISTINCT(UNION(SELECTCOLUMNS('BR',"LP",'BR'[LP]),SELECTCOLUMNS('LR',"LP",'LR'[LP]),SELECTCOLUMNS('LB',"LP",'LB'[LP])))
However, I'm not sure how to apply this as a slicer because when I try it, there are no changes in the chart. Additionally, I want to create another slicer where users can select which variables to include in the stacked bar chart. Specifically, I have four variables: cost A, cost B, cost C, and cost D, which contain numerical values. Should I insert those fields from each tables in the column y axis to get what I want? The chart should only display the values for a single plant. Please provide suggestions so that I can achieve my desired outcome. Thanks in advance
Solved! Go to Solution.
Regarding costs,
Unpivot the table- either at the source, or in the Query Editor:
1. Right click the table, then Edit query
2. Select your costs columns
3. Follow this example
Now you have a dimension (Costs) which you can use as a slicer.
I admit that I don't understand the LP table(s) just yet.
Perhaps I'd need the dataset itself to help further.
Regarding costs,
Unpivot the table- either at the source, or in the Query Editor:
1. Right click the table, then Edit query
2. Select your costs columns
3. Follow this example
Now you have a dimension (Costs) which you can use as a slicer.
I admit that I don't understand the LP table(s) just yet.
Perhaps I'd need the dataset itself to help further.
Thank you for resolving the issue I had. As for the LP table, it has been resolved by manually creating a combination table by merging the three tables together.
Can you share the 2 tables structure with 3-4 rows of data each?
I suspect we would need to UNION these tables at the source with a column to seperate them into categories (BR, LR, and LB).
Then we will have 1 table to work with, and its colums will be functioning slicers.
Hello, this is the Cost A, B, C, D, and the LP preview table. Each table such as LR, BR, and LB has the same structure as this figure below.
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 |
---|---|
87 | |
87 | |
87 | |
67 | |
49 |
User | Count |
---|---|
135 | |
113 | |
100 | |
68 | |
67 |