Forum Discussion
Create a dynamic table with a calculated row
Hi ashwinkolte ,
Please refer to my pbix file.
let
Source = Table,
#"2022" = Table.SelectRows(Source, each Date.Year([Date])=2022),
Custom3 = Table.ToRecords(#"2022"),
MaxDate = List.Max(Source[Date]),
MaxCol1Value = Table.SelectRows(Source,each [Date]=MaxDate)[Col 1]{0},
Total = List.Sum(Table.SelectRows(Source, each Date.Year([Date])<>2022)[Col 3]),
Custom1 = Total,
Custom2 = {[Date = MaxDate,Col 1=MaxCol1Value*Total,Col 2=null,Col 3=null]},
Custom4 = Table.FromRecords(List.Combine({Custom3,Custom2}))
in
Custom4
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ashwinkolte3 years agoHelper III
Dear v-rongtiep-msft
Thanks for your response. However as mentioned in my requirement , I need a dynamic table to be created when a user slices data on BI visual and depending on which records user selects in table 1. Is that possible ?
- Anonymous3 years agoNot applicable
Hi ashwinkolte ,
The dynamic addition of rows does not seem to be very feasible.
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.