Forum Discussion
Anonymous
6 years agoNot applicable
Always Fixed X axis
Hi Experts, I wants to use fixed X-axis on Power BI. For example, I have two tables like below. [Category Table] Category Category Order A 1 B 2 C 3 D 4 E 5 [...
v-juanli-msft
Community Support
6 years agoHi Anonymous
If i understand you correctly, you need to replace blank value with some specific values.
For example, for p1, it don't has dates for "c" and "d", we can fill dates for "c" and "d" with the last date(date for "b").
To achieve this, you need go to Transform data, create a new query:
let
Source = Table.SelectColumns(Table1,{"Category"}),
#"Added Custom" = Table.AddColumn(Source, "Product", each List.Distinct(Table2[Product])),
#"Expanded Product" = Table.ExpandListColumn(#"Added Custom", "Product"),
#"Merged Queries" = Table.NestedJoin(#"Expanded Product", {"Category", "Product"}, Table2, {"Category", "Product"}, "Table2", JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(#"Merged Queries", "Table2", {"Date"}, {"Table2.Date"}),
#"Sorted Rows" = Table.Sort(#"Expanded Table2",{{"Product", Order.Ascending}, {"Category", Order.Ascending}}),
#"Filled Down" = Table.FillDown(#"Sorted Rows",{"Table2.Date"})
in
#"Filled Down"
Close&&apply
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.