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.
Hi all,
i am struggling to divide two values from a table i have sorted and created using a matrix table. Its pretty easy to do it in Excel but i can't really understand how to make it work in PowerBI.
For example i would like to do GM$ divide by Total Cost. However the table i have generated is a sum total of the values in EMP. If i manually add a extra column to do this , it does this for every single value instead of the the total sum i want from the table. Hopefully this makes sense.
GM% = ('Raw Data'[GM $]/'Raw Data'[Total Cost]) Syntax used to generate this. Although its clearly not correct.
How i did it in excel to produce the correct results.
Solved! Go to Solution.
@jkesavan , replace / with comma,
Check the formula I shared. I'm going through the data.
Check if the attachment can help
@jkesavan , It should be like this, but Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
GM% = divide(sum('Raw Data'[GM $]),sum('Raw Data'[Total Cost]))
The relevant columns are GM $ and Total Cost. I have attached data in excel.
Job | Sub | C/H | Div | Client | Total Cost | GM $ |
123 | 1 | C | abc | 231 | 4342 | |
123 | 1 | C | abc | 86.5 | 249.5 | |
123 | 1 | C | abc | 51.82 | -14.82 | |
123 | 2 | C | abc | 58.04 | 22.26 | |
123 | 3 | C | abc | 83.85 | 18.35 | |
123 | 4 | C | abc | 141.28 | 199.72 | |
123 | 1 | C | abc | 218.23 | 382.73 | |
@jkesavan , replace / with comma,
Check the formula I shared. I'm going through the data.
Check if the attachment can help
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.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |