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.
Hello all,
In Power BI, I created a matrix that looks something like this (I made a sample matrix from a sample data set in excel, but just pretend it's in Power BI):
The matrix automatically calculated the sums of beaches and parks.
Here is an example of the dataset the matrix is built from:
In the Power BI matrix this is how the data is arranged:
rows=location
columns= type, department
values= count of beaches, count of parks
And I want to create a new column in the matrix that calculates the percentact difference based on the sum beach/park counts:
However, I've tried creating new measures but ran into errors. I saw from other posts that you would need to create a new column, which will technically work but then it has been calculating the percentage incorrectly.
When I create new percent coulumn Power BI has been calculating it based on my dataset, like this:
And when I add the % column to the value section of my matrix, it calculates a sum of my percentage. Which is not what I want:
How do I calculate a percent column based on two aggregate sum columns from a matrix?
@mreynaud
Yes, you can always use the fields(either column or measure value) to create new measures and include in your report visuals.
Paul Zheng _ Community Support Team
I think I just solved it by creating a new measure:
divide(sum(Table["Count of Beaches"]), sum(Table["Count of Parks"]))
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 |
---|---|
118 | |
105 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |