Forum Discussion
Anonymous
6 years agoNot applicable
Progression calculation
Hello everyone! The Brazilian government has adopted a progressive table for the collection of social security contributions. The rates are as follows. Contribution Salary Rate Until R...
- 6 years ago
Anonymous - You basically need to implement a WHILE loop in DAX, here is how: https://community.powerbi.com/t5/Quick-Measures-Gallery/While-Loop/m-p/637535#M320
- Anonymous6 years ago
HI Anonymous,
Please split your contribution salary to two fields based on 'to' character and remove others not used text strings, then you can write a measure formula to calculate on them.
Measure = VAR summary = SUMMARIZE ( 'Table', [Contribution Salary From], [Contribution Salary To], [Rate], "Result", ( [Contribution Salary To] - [Contribution Salary From] ) * [rate] ) RETURN SUMX ( summary, [Result] )Regards,
Xiaoxin Sheng
- 6 years ago
Hi,
You may refer to my solution - Compute transaction fee based on a tiered pricing model.
Hope this helps.
Asac_14
6 years agoResolver I
Hi Anonymous Here is the measure to compute effective rate -
Effective Rate =
Var Sal=SUM('Salary'[Salary])
Var Total=IF(Sal>3134.41,(1045*0.075)+(1044.60*0.09)+(1044.79*0.12)+(Sal-3134.41)*0.14,IF(Sal>2089.61,(1045*0.075)+(1044.60*0.09)+(Sal-2089.61)*0.12,IF(Sal>1045.01,(1045*0.075)+(Sal-1045.01)*0.09,(Sal-1045)*0.75)))
Return
DIVIDE(Total,Sal)
Screenshot
Replace with your table and field name. Pls accept it as solution if it solves your problem. Kudos are welcome as well 😉
Thanks & Regards,
KK
+91-9940-28-4669