Reputation: 9724
I'm coming from Power BI background where-in I would have created a measure to solve this problem.
However there is no measure in the paginated report so need some help.
I'm using Power bi report server and a paginated report. I have following fields in the dataset:
Client, date, emp_count, emp_call
This contains 1 record per day per client. I want to show this in a matrix visual along with emp_call/emp_count value.
So I added emp_call/emp_count as a dataset column (called it rate), and inserted the matrix via wizard and the matrix shows client, date, emp_count, emp_calls, rate (formatted rate as percentage).
Now the daily values are correct but the aggregate percentage value at the client level is wrong (because it does a SUM by default). So I removed the SUM function from the expression and just kept it as rate [rather than SUM(rate)], and the result is still wrong. What is the correct way to handle such aggregations?
Upvotes: 0
Views: 606
Reputation: 21703
You should just be able to use
=SUM(Fields!emp_call.Value) / SUM(Fields!emp_count.Value)
If fact you could use the same expression in your detail rows and it should work fine, so there is no need to calculate and add the rate column to the dataset.
One more thing, I would try to avoid using the Wizard as it's not very magical and try working from a blank report. When I started out, I used the Wizard but quickly ended up spending more time fixing things than the time it would have taken to do it from scratch.
Upvotes: 0