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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IF
Post Prodigy
Post Prodigy

computed entity

Hi,

I am getting data from a dataflow for my dataset. The dataflow that I receive data is huge, millions of records. It really slows down my report if I get it all. I wonder if it is possible to compute the dataflow and get the computed entity for my report. 

For example; this is an example for the dataflow:

CountDatetypevalue
a101.2019s1
a201.2019m2
a301.2019a1
q101.2019s2
q201.2019a1
q301.2019m2
w101.2019a1
w201.2019a2
w301.2019m2
e101.2019a1
e301.2019m2
e401.2019a1
e501.2019a2
w401.2019m1
w501.2019m3

 

I want to make a computed entity from this data and use it as a dataflow for my report. It should show:

Datetypevaluecount
01.2019s315
01.2019m1215
01.2019a915

In order to decrease the data size, I want to do it in this way:

Date: I should be able to selected the data for last 18 months.

Type: total of values for eah type category.

Value: total of values in that category

count: count of the count column at the previous table.

 

Is it possible to do it?

 

Thanks in advance!

 

 

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

Hi @IF ,

After you create a data stream and connect to the data source, transform the table in ‘Edit Query’, please refer to the following code.

let

    Source = Excel.Workbook(File.Contents("C:\Users\lionelch\Desktop\Sample data\1.xlsx"), null, true),

    Sheet3_Sheet = Source{[Item="Sheet3",Kind="Sheet"]}[Data],

    #"Promoted Headers" = Table.PromoteHeaders(Sheet3_Sheet, [PromoteAllScalars=true]),

   #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Count", type text}, {"Date", type number}, {"type", type text}, {"value", Int64.Type}}),

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Table.RowCount(#"Changed Type")),

    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"value", Int64.Type}}),

    #"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Custom", "__Custom"}}),

    #"Grouped Rows" = Table.Group(#"Renamed Columns", {"__Custom", "Date", "type"}, {{"__value", each List.Sum([value]), type nullable number}})

in

    #"Grouped Rows"

 

v-xuding-msft_0-1606200944424.png

 

v-xuding-msft_1-1606200944426.png

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @IF ,

After you create a data stream and connect to the data source, transform the table in ‘Edit Query’, please refer to the following code.

let

    Source = Excel.Workbook(File.Contents("C:\Users\lionelch\Desktop\Sample data\1.xlsx"), null, true),

    Sheet3_Sheet = Source{[Item="Sheet3",Kind="Sheet"]}[Data],

    #"Promoted Headers" = Table.PromoteHeaders(Sheet3_Sheet, [PromoteAllScalars=true]),

   #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Count", type text}, {"Date", type number}, {"type", type text}, {"value", Int64.Type}}),

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Table.RowCount(#"Changed Type")),

    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"value", Int64.Type}}),

    #"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Custom", "__Custom"}}),

    #"Grouped Rows" = Table.Group(#"Renamed Columns", {"__Custom", "Date", "type"}, {{"__value", each List.Sum([value]), type nullable number}})

in

    #"Grouped Rows"

 

v-xuding-msft_0-1606200944424.png

 

v-xuding-msft_1-1606200944426.png

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors