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 would like to create a column/measure that computes the sum of one column for all distinct combinations of two other columns.
The example below shows hours per operator per date. The last column "Job hours" is the one I am looking for. I would like to calculate the sum of column "Hours" per distinct combination of "Date" & "Job". Can anyone help me how to calculate these subtotals? Many thanks!
Solved! Go to Solution.
hello @SoulCuber
This give you the solution
Job Hours = CALCULATE(Sum(Table1[Hours]),ALLEXCEPT(Table1,Table1[Date],Table1[Job]))
😃
Dears,
I'm stuck in getting below calculation; any help is much appreciated 🙂
I want to divide column C each row by the subtotal of column D
Cheers! MD
hello @SoulCuber
This give you the solution
Job Hours = CALCULATE(Sum(Table1[Hours]),ALLEXCEPT(Table1,Table1[Date],Table1[Job]))
😃
Hi Victor,
Muchas gracias, functiona estupendo!! Great thanks, this was exactly what I was looking for!!!
Recuerdas de Holanda,
Jeroen
You can use the summarize function to create a new table from this table that is summarized on the first two columns with a sum of whatever other columns you want, or other functions.
ie somthing like table 2=summarize(table1, date, job, "Total Job Hours", Sum(Job Hours)
Thanks a lot DSimma for your suggestion. That does indeed create the desired column, but in a different table. Which is indeed what I have done now. However, I would like to have the column in the original table. I guess I could link the summed column back into the original column by creating a new key column, but that is ugly. I wondered if there would be a formula for it.
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |