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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jmclej
Helper I
Helper I

how to simply display the same content in a report that I have at the end of my transformation steps

Hello,

I have the following steps ending with a table, which I want to display as is in a table report. The M code is :

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ndQ9bsMwDAXg3acQvDYWSOrP1lWCDBocJEVbF4085PaVOrSMHaVyJi3+8J4Jiftm32K7a+M5ntPxOp0+0kFA1IHpSAlED8ZrkMoM4gUIIH/9NY/tYXdrL+GdUxDoPAxeG9kr+qXH8HZZ288QFxa9SVZLcmZtm6Qp6znOi2T7o61XyqOWtlf3kpnlybZDJzD9be9pkI7wfrLKOsSwTkaB9Di5bAut/0bN6BOlddZTnBbBQ03pgu0rSjPKS7v/Sxdjq+Zcts9Wrpyzyfoar9uvZdY26zGOy6foKp6iLdgUXbBsXiVcswOY3bwDmN20A5rDNw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Id = _t, Ref = _t, User = _t, Creationdate = _t, Isuserpartofteama = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Id", Int64.Type}, {"Ref", type text}, {"User", type text}, {"Creationdate", type datetimezone}, {"Isuserpartofteama", type logical}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", (k) => Table.SelectRows(#"Changed Type", each [Id] = k[Id])),
    #"Removed Duplicates" = Table.Distinct(#"Added Custom", {"Id"}),
    #"Removed Columns" = Table.RemoveColumns(#"Removed Duplicates",{"Ref", "User", "Creationdate", "Isuserpartofteama"}),
    Custom1 = Table.SelectRows(#"Removed Columns", each Table.Contains([Custom], [Isuserpartofteama = true])),
    #"Added JobStarted" = Table.AddColumn(Custom1, "JobStarted", each Table.Last(Table.SelectRows([Custom], each [Isuserpartofteama] = true))[Creationdate], type datetimezone),
    #"Added JobEnded" = Table.AddColumn(#"Added JobStarted", "JobEnded", each if Table.First([Custom])[Isuserpartofteama] = true then "not finished yet" else Table.First(Table.SelectRows([Custom], each [Isuserpartofteama] = false))[Creationdate], type datetimezone),
    #"Added TimeTaken" = Table.AddColumn(#"Added JobEnded", "TimeTakenInHours", each Number.Round(if Table.First([Custom])[Isuserpartofteama] = true then Duration.TotalHours(DateTimeZone.LocalNow() - [JobStarted]) else Duration.TotalHours([JobEnded] - [JobStarted]), 2), type duration),
    #"Added SLA" = Table.AddColumn(#"Added TimeTaken", "SLA", each if [TimeTakenInHours] > 24 then "NOT OK" else "OK")
in
    #"Added SLA"

 

But when I look into what is shown in power bi desktop, I see that it auto-generated sums and counts for instances, why is that ?

jmclej_0-1665416879543.png

If I add a Table report, I then don't end up with the same amount of columns (date is not 1 column anymore, duration column doesn't show anything) :

jmclej_1-1665417068528.png

What I want to see in my report is exactly the same as that :

jmclej_2-1665417191736.png

How can I achieve this please ?

Thank you,

2 REPLIES 2
aj1973
Community Champion
Community Champion

Hi @jmclej 

It's all played in the Format section of the visual

aj1973_0-1665418615193.png

Use 

aj1973_1-1665418670120.png

and for the dates format them to Date/Time

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hello,

I have already seen indeed that I can select "Don't summarize" on the Visualization panel, but why does it summarize without asking me anything by default ? Why sometimes "Sum of" and sometimes "Count of" ? On what is it based ? Even after I change to "Don't summarize", the SIGMA symbol is still there in the Field panel, how can I change that ? I have changed from datetimezone to datetime also and I still have the date field split in year/month/day/... and my duration field doesn't show a value within a report, why is that ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors