We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I've been running into an issue with calculating row values and total values for a measure. The measure includes calculations involving rounding and division by a parameter. Each column value for the measure is rounded appropriately after dividing, but the total row ends up a number or two off since the total row value is rounded for the sum. For the total row, I would like each row value to be rounded individually and then summed - At that point, the total row sum should be correct.
The data goes like this:
Parameter = Customers/Staff Ratio = 125 Customers/Staff
State | Customers | Current Staff | New Staff
New Staff is the measure here. New Staff can't be negative (we don't want to remove staff) - If the calculation is less than 0, then we set it to 0 (no new staff).
I set up the first measure like this:
The result of this calculation is the calculated New Staff value based on the customer count dividided by the ratio parameter. After that, we subtract the current staff. Before rounding, this would usually be a decimal. This can be a negative or positive number.
For the table visualization, I do another measure to get a non-negative number. If the value is negative, I set it to 0 (no new staff). I am trying the HASONEFILTER method to calculate the row value and total row values separately:
Hi @Anonymous ,
Please provide sample data with some expect result to help us clarify your requirement.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 39 | |
| 32 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 37 | |
| 36 | |
| 22 |