The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
@Anonymous
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"]))