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'm new to PowerBI and now I have my first problem.
I have created an average that multiplies value by quantity but I do not want to perform the operation with the total values of the table.
The average is very simple.
Bajas Internas =
CALCULATE(SUM ('tabla1$Item'[Precio Coste medio ]) * SUM ('tabla2$Item Ledger Entry'[Quantity])* -1)
precio coste medio quantity Bajas internas
5 -1 5
0.75 -100 75
3 -100 300
------------------------------------------------------------------------------
total 8.75 -201 1758.75
I need the total to be the sum of internal losses and not the multiplication of the totals ...
I hope you can help me
Solved! Go to Solution.
You can solve the problem by creating a new calculated column, using:
Hi @lluis ,
I'm assuming that you have some other column on your table that makes a identification of each line correct try to do the following measure:
Bajas Internas = VAR Bajas_Internas = CALCULATE ( SUM ( 'tabla1$Item'[Precio Coste medio ] ) * SUM ( 'tabla2$Item Ledger Entry'[Quantity] ) * -1 ) RETURN IF ( HASONEFILTER ( 'tabla1$Item'[Column] ); Bajas_Internas; SUMX ( ALLSELECTED ( 'tabla1$Item'[Column] ); Bajas_Internas ) )
Replace the Column by the name of the column you are using to identify each line.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThank you very much for answering
You can solve the problem by creating a new calculated column, using:
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |