Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
https://drive.google.com/file/d/1xuZ-nFqetmKsjVW1EI4_VLMLSBV7feAD/view?usp=sharing
In the file attached,
Is there any way in which if Actuals is 0, hide the column itself,
Desired output,
I think its impossible, but still asking because that came up as a requirement
Solved! Go to Solution.
Hi @Antmkjr ,
There is no better way to hide the "column" base on the specific conditions, you can follow the suggestion by @amitchandak to unpivot the columns "Actuals" and "Forecasts", then create a matrix visual(Columns: Date hierarchy: Year, Month name & Attribute Values: Value). Please find the details in the attachment.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZY9RCsQwCETv4nchjqaNniX0/teo1WR3YfFjYB7xmTlJG9CE4XQQmDnCPIbuY1JvsA0lGUQhyc4m52ae7IOu1oPI241rjAgFNNEoXTJnfyN7K1P22ntfKq2FXq7aaMP2K/ACiKbOg0iZ9A/p2iY/BOmLWf/9EknJ/QA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Actuals = _t, Forecast = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Actuals", Int64.Type}, {"Forecast", type number}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Date"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] <> 0))
in
#"Filtered Rows"
In addition, you can review the content in the following threads, hope they can help you resolve the problem.
Hide/do not display empty columns in a matrix visual
Hide column in table visual if contents are 0
Best Regards
Hi @Antmkjr ,
There is no better way to hide the "column" base on the specific conditions, you can follow the suggestion by @amitchandak to unpivot the columns "Actuals" and "Forecasts", then create a matrix visual(Columns: Date hierarchy: Year, Month name & Attribute Values: Value). Please find the details in the attachment.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZY9RCsQwCETv4nchjqaNniX0/teo1WR3YfFjYB7xmTlJG9CE4XQQmDnCPIbuY1JvsA0lGUQhyc4m52ae7IOu1oPI241rjAgFNNEoXTJnfyN7K1P22ntfKq2FXq7aaMP2K/ACiKbOg0iZ9A/p2iY/BOmLWf/9EknJ/QA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Actuals = _t, Forecast = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Actuals", Int64.Type}, {"Forecast", type number}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Date"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] <> 0))
in
#"Filtered Rows"
In addition, you can review the content in the following threads, hope they can help you resolve the problem.
Hide/do not display empty columns in a matrix visual
Hide column in table visual if contents are 0
Best Regards