We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
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"]))
User | Count |
---|---|
64 | |
59 | |
46 | |
35 | |
32 |
User | Count |
---|---|
85 | |
83 | |
70 | |
49 | |
46 |