0
votes

I please need assistance to calculate % based on the below table.

Table 1 (Fixed Table - Total vehicles per branch)

Table 2 (Distinct Count - Total vehicles based on vehicle regsitation) Current Measure Calculation shown below.

Table 3 (Percentage of Table 2 / Table 1, using Branch Table as Unique Identifier)

Branch 1 = 5
Branch 2 = 5
Branch 3 = 10
Branch 4 = 7

Count Loads = DISTINCTCOUNT('DEL-MAN-REP'[Registration Number])
Vehicles 1 = 5
Vehicles 2 = 3
Vehicles 3 = 1
Vehicles 4 = 4

Branch 1 % = 100%
Branch 2 % = 60%
Branch 3 % = 10%
Branch 4 % = 57%

Any assistance will be appreciated.

1
You are looking for a way to create the percent data from the Branch and Vehicle?SRT HellKitty
Yes, I need the % as per last tableuser1870673
Can you add a new column in your data for this? I can add an answer if that will work.SRT HellKitty
Yes, let me give that a tryuser1870673

1 Answers

0
votes

If you are in the Data section of Power BI(matrix looking icon on the right task bar), there is a button in the 'Modeling' menu called 'New Column'. Click that and it will create a column named "Column" with the formula set to "Column = ". If you change the "column" in the formula it will change the column name.

Now, start typing the column name you want to use that has the 'Vehicles' data and divide that with the 'Branch' data. finally, press the '%' button under Formatting in the Modeling tab.

If for whatever reason any Branch does not have any vehicles(0), you will need an error handler. so it would look like IFERROR(Vehicles/Branch,0)