Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have the following table:
Client | Order | Payment_Deadline | Revenue |
Jonh Doe | 1 | 98 | $4.140 |
Jonh Doe | 2 | 75 | $3.450 |
I create a measure to return the "% of Total", like the following:
% of Total = DIVIDE(SUM([Table1]Revenues);CALCULATE(SUM([Table1]Revenues); ALLSELECTED(Table1)); 0)
Then, when I put the measure on my visual table, I have the following result:
Client | Order | Payment_Deadline | Revenue | % of Total |
Jonh Doe | 1 | 98 | $4.140 | 54.54% |
Jonh Doe | 2 | 75 | $3.450 | 45.45% |
And now, here is my problem:
I need to create a coefficient like my client requested, the calculation is simple, is just a:
Coefficient = [% of Total] * AVERAGE([Table1]Payment_Deadline)
Then, when I put the previous measure on my visual table, I have the following result, including total line:
Client | Order | Payment_Deadline | Revenue | % of Total | Coefficient |
Jonh Doe | 1 | 98 | $4.140 | 54.54% | 53.45 |
Jonh Doe | 2 | 75 | $3.450 | 45.45% | 34.09 |
Total | 86.50 | $7.590 | 100.00% | 86.50 |
My problem is on "Total Line", I cannot show 86.50 on Coefficient column, I need to show the SUM of values. The correct value on this case is 87.54 (53.45 + 34.09).
To be honest, I don't know how can I achieve this.
Extra: I use ";" insted of ","
Solved! Go to Solution.
You need to convert measure [% of Total] to calculate column using DAX below:
% of Total = DIVIDE(Table1[Revenue], SUM(Table1[Revenue]), 0)
Then create a measure as below to achieve your requirement:
Coefficient = SUMX(Table1, [% of Total] * Table1[Payment_Deadline])
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You need to convert measure [% of Total] to calculate column using DAX below:
% of Total = DIVIDE(Table1[Revenue], SUM(Table1[Revenue]), 0)
Then create a measure as below to achieve your requirement:
Coefficient = SUMX(Table1, [% of Total] * Table1[Payment_Deadline])
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |