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.
Hello, I really need help to find a dax function that multiplay result for a value in other column and go consecutive...
for example:
A1 = B1
B1 x A2 = B2
B2 x A3 = B3
B3 x A4 = B4
Please and Thank you!!
say, you have a column that index each rows, such as 1,2,3....
B=PRODUTX(FILTER(Table,Table[Index]<=EARLIER(Table[Index])),Table[A])
@Anonymous
You cannot do calculation to change the existing column using DAX. You may only add another column C to have the result but you don't have column B without the calculation. So I am pretty sure you can not achieve this with DAX.
Paul Zheng _ Community Support Team
Best Regards
You can try this in new blank query and adjust according to your needs.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtCztLQ0N1aK1UFlG8JFLAwt4GxzExM428wESZehpVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
Type = Table.TransformColumnTypes(Source,{{"Column1", type number}}),
NewColumn = Table.FromColumns( {Type[Column1], List.RemoveFirstN(List.Accumulate(Type[Column1],{1}, (s,c)=> s & {List.Reverse(s){0}*c}), 1)}, {"A","B"}),
FINAL = Table.TransformColumnTypes(NewColumn,{{"A", Percentage.Type}, {"B", Percentage.Type}})
in
FINAL
@Jakinta Thank you, how can I use this query as a new measure?
I'm using measure for values in A and need the DAX function to figure out values in B
Please and thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.