Forum Discussion
How to Expand Stacked Bars To fill Visual Pt2
- 3 months ago
Hi caplogic ,
Here is the PBIX.
Let me also advise to you to take the learning paths because they can really help you start and get the main concepts.
https://www.microsoft.com/en-us/power-platform/products/power-bi/learning
https://learn.microsoft.com/en-us/training/browse/?products=power-bi
I have provided a link to the PBIX
https://drive.google.com/file/d/1WKCLRJrXFmT9DMj_xgyQK-4ahuK0yGDt/view?usp=sharing
caplogic
I suggest changing a little bit your model:
1. In power query add an "unpivot" and a "change data type" steps :
let
Source = Sql.Database("XPS-18-LANDELLS", "latitude"),
dbo_AcctHdlrAnalyisByPlyAndBdrRoot = Source
{[Schema = "dbo", Item = "AcctHdlrAnalyisByPlyAndBdrRoot"]}
[Data],
#"Unpivoted Columns" = Table.UnpivotOtherColumns(
dbo_AcctHdlrAnalyisByPlyAndBdrRoot,
{
"Account Handler",
"BusinessType",
"BinderRootStatus",
"BinderType",
"NumberOfPolicies",
"BDXDate",
"Coverholder"
},
"Attribute",
"Value"
),
#"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Columns", {{"Value", type number}})
in
#"Changed Type"
Create an explicit measur (best practices: do not use implicit fields directly where you want measures):
SumValues = sum(AcctHdlrAnalyisByPlyAndBdrRoot[Value])Finally in the Clustered Column Chart use the Categories (created in the UnPivot step in powerquery) as the x-axis field, and use SumValues Measure in the y-axis values: