Forum Discussion
Manar
Helper II
8 years agoReplace empty table with 0
Hi, I have a summary table that consist of a union of multiple tables , some of those tables might be empty instead I would like to show 0, but PowerBi doesn't show these table at all (it only showe...
- 8 years ago
Hi Helly,
What's the data source? Can you add one row of 0s in the data source? Please try the solution below and the demo in the attachment.
Add one row of 0s in the Query Editor.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Name = _t, Value = _t]), result = Table.InsertRows(Source, 0, {[Name = "0", Value = "0"]}) // Add this line by hand. in resultBest Regards,
Dale
hellyhan
8 years agoNew Member
Thanks for sharing your idea, because I don't have how to replace empty table ?
Thansk
Helly
v-jiascu-msft
Microsoft Employee
8 years agoHi Helly,
What's the data source? Can you add one row of 0s in the data source? Please try the solution below and the demo in the attachment.
Add one row of 0s in the Query Editor.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Name = _t, Value = _t]),
result = Table.InsertRows(Source, 0, {[Name = "0", Value = "0"]}) // Add this line by hand.
in
result
Best Regards,
Dale
- hellyhan8 years agoNew Member
Hello v-jiascu-msft
Thanks for sharing valuable infromation.