Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello there!
Have 2 tables (PVprod and StrutturaCER). I need to add new columns named "Pn" (n=1,2,...) to first table PVprod.
Pn = reference column IRR * a scaling coefficient PVnew[n] taken from column PVnew of the second table "StrutturaCER", where n is the row index of PVnew (see pics below)
Is this at all possible in P.Bi ?
I'd like to get as many new colums added to table PVprod for all values of PVnew (including zero values).
Any idea / suggestion in DAX?
Thanks a lot, Alex
THanks a lot both guys. Would like to attach my pbix example file but HOW????
I drag the pbix here but got "file type (.pbix) is not supported." Cannot find the icon to attach file anywhere.
M Code
=Table.FromRecords(Table.TransformRows(PVprod,each Record.TransformFields(_,List.Transform(List.Position(StrutturaCER[PVnew]),(r)=>{"P"&Text.From(r),(x)=>[IRR]*StrutturaCER[PVnew]{r}}),2)))
Hi, thanks but getting this error. Seems a "ciclic error during evaluation"
it's not a formula in Custom Column
it's a whole step code, try to delete Table.AddColumn outside
Hi, @alex779
Based on the information you have provided, I created two tables, Table1 and Table2.
Then New Column, multiply ScalingFactor of Table2 and Value1 of Table1 to get a new column.
Column =
Table1[Value1] * RELATED(Table2[ScalingFactor])
This enables calculations across tables, so if you want to do more with your table, provide me with more data.
How to Get Your Question Answered Quickly
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you but my tables are NOT of the same size.. So it does not work for me.
My Table1 is like 9000 rows and Table2 (scalingfactors) only 10 rows. I had to rescale each of the 9000 cells IRR in a new column with scaling factors taken from Table2, and add as many columns as the 10 scaling factors..
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |