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.
If I have a column with different values like below, how do I calcuate it?
Category | Values |
Income | 34232 |
Expanses | 66554 |
Cost of sales | 4342 |
Taxes | 6655 |
I wanna for example calucalte cost of sales divided with taxes in the category.
Solved! Go to Solution.
Hi, @selected_
You can try something like below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hi @selected_
Not clear about your expected result, so I assume that you want to calculate items in the category divided with taxes.
If so, you can take steps bellow for reference.
M_divide =
DIVIDE (
SELECTEDVALUE ( 'Table'[Values] ),
CALCULATE (
SELECTEDVALUE ( 'Table'[Values] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = "Taxes" )
)
)
Result:
If you want to change the number of decimal places:
Hope this helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi, @selected_
You can try something like below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |