Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
Appreciate if someone could help me. Thank you
I have a pivot table and would like to add new measure
I would like to calculate weights for each row. Sample as below
if row number=1 then 0.06
else 0.94 * previous row value
Solved! Go to Solution.
Hi @Isma ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
IF (
MAX ( 'Table'[Row number] ) = 1,
MAX ( 'Table'[Row number] ) * 0.06,
0.06
* POWER ( 0.94, MAX ( 'Table'[Row number] ) - 1 )
)
If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.
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.
Hi @Isma ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
IF (
MAX ( 'Table'[Row number] ) = 1,
MAX ( 'Table'[Row number] ) * 0.06,
0.06
* POWER ( 0.94, MAX ( 'Table'[Row number] ) - 1 )
)
If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.
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.
Hi,
Sorry that I only know how to do this in Power Query.
If you are interested in knowing how to do this in Power Query, please check the attached file.
1. Open pbix file
2. go to "Transform data"
3. New source -> blank query -> create a function.
when you open advanced editor, you can see the query like below.
let
Source = (x as number) as number =>
let f = function(x-1) * 0.94
in
if x=1 then 0.06 else f
in
Source
4. In Data query, add invoke custom function.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
User | Count |
---|---|
54 | |
47 | |
19 | |
16 | |
15 |
User | Count |
---|---|
114 | |
44 | |
44 | |
28 | |
22 |