The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello, gurus!
I am trying to calculate "Total quality", based on combination of previous rows including the calculated column itself:
i: Mass: Quality: **bleep** Mass: Total quality
1) 100 1 100 100*1/100=1
2) 50 2 150 (100*1+50*2)/150=1.33
3) 50 3 200 (150*1.33+50*3)/200=1.75
4) -100 100 1.75
5) 80 2 180 (1.75*100+80*2)/180=1.86
Basically:
Total quality (i)= if positive, then [**bleep** mass (i-1)*Quality (i-1)+Mass(i)*Quality(i)]/**bleep** Mass(i); if negative, then Total quality (i-1).
I went to through some articles, and seems like handling recursive calcuation is not straightforward in DAX. But I thought I would give it a try, and maybe there is some workaround. Any workaround helps (either through calculated column, or measure, or power query).
Thanks in advance!
Hi @gulzatsirenova ,
You may refer to the links:
Recursive Functions in Power BI / Power Query
Recursive Calculations in PowerPivot using DAX
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
69 | |
69 | |
66 | |
54 | |
28 |
User | Count |
---|---|
112 | |
82 | |
66 | |
48 | |
43 |