Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
amalrio
Helper V
Helper V

Paginated reports visual how to oraninise backend table

Hello Paginated Report Gurus, 

 

I wanted to show a paginated report visual like below (need recommendation to the type of the visual I should use too.

 

image001 (1).png

below is how the data organised in the backend SQL table. Should it be organised in a diffrent way to achieve the above visual. any advice will be hightly appriciated. Thanks a lot in advance

unnamed.png

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @amalrio,

You can use 'transpose table', 'promoted header', and 'unpivot columns' functions to shape the table structure to reproduce the effect in matrix visual.

Result:

1.png

Full query:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY4xD4MgEIX/CmFWgkCBjm23Jk2HdmmMAzGoTSwY1P9fQDRNKmF49+67e1eWsIAZ9P9uNLhZM3VePzunUzWm1ksrB6ushGTBi/w0tzkporzOZpUPPeQER5IuJP1B93WAWcgZtHmbFpxVr0ytvUMo5UJSiQjD8QWPCcoYI0iIzYsrDuFyp8zYaAcaZz9A1bWdzQQQQsstcZxiwbFAcl0ZZrnvXHo7/sWTgpEjknyLwslEx2TuclX1BQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, TX = _t, M1 = _t, M3 = _t, Y1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Index", Int64.Type}, {"TX", type text}, {"M1", type text}, {"M3", type text}, {"Y1", type text}}),
    #"Transposed Table" = Table.Transpose(#"Changed Type"),
    #"Removed Top Rows" = Table.Skip(#"Transposed Table",1),
    #"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"", type text}, {"_1", type date}, {"_2", type date}, {"Opening Balance", type number}, {"Transfer from account ...", type number}, {"Closing Balance", type number}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"", "_1", "_2"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Columns",{{"", "Desc"}, {"_1", "Date1"}, {"_2", "Date2"}, {"Attribute", "TX"}})
in
    #"Renamed Columns"

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
amalrio
Helper V
Helper V

Yesh, that worked thanks @v-shex-msft 

v-shex-msft
Community Support
Community Support

HI @amalrio,

You can use 'transpose table', 'promoted header', and 'unpivot columns' functions to shape the table structure to reproduce the effect in matrix visual.

Result:

1.png

Full query:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY4xD4MgEIX/CmFWgkCBjm23Jk2HdmmMAzGoTSwY1P9fQDRNKmF49+67e1eWsIAZ9P9uNLhZM3VePzunUzWm1ksrB6ushGTBi/w0tzkporzOZpUPPeQER5IuJP1B93WAWcgZtHmbFpxVr0ytvUMo5UJSiQjD8QWPCcoYI0iIzYsrDuFyp8zYaAcaZz9A1bWdzQQQQsstcZxiwbFAcl0ZZrnvXHo7/sWTgpEjknyLwslEx2TuclX1BQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, TX = _t, M1 = _t, M3 = _t, Y1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Index", Int64.Type}, {"TX", type text}, {"M1", type text}, {"M3", type text}, {"Y1", type text}}),
    #"Transposed Table" = Table.Transpose(#"Changed Type"),
    #"Removed Top Rows" = Table.Skip(#"Transposed Table",1),
    #"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"", type text}, {"_1", type date}, {"_2", type date}, {"Opening Balance", type number}, {"Transfer from account ...", type number}, {"Closing Balance", type number}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"", "_1", "_2"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Columns",{{"", "Desc"}, {"_1", "Date1"}, {"_2", "Date2"}, {"Attribute", "TX"}})
in
    #"Renamed Columns"

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft ,

 

Can you plese let me know how do I sort Text Column, I have tried with no suceess as TX column has duplicate values. I have tired to added a sort order column since TX column has duplicate values it does not allow me to do so.

The order I want it below

 

Opening Balance

Transactions

Closing Balance

 

Your help is much appriciated.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.