Forum Discussion
Sum Percentage Total incorrect
Hi there,
I actually would like to ask for help in a common subject in PowerBI. I have a table like this:
I've calculated a measure to sum the NUM_CANTIDAD column where there is no promotion:
TotalUnits = SUMX('Table', 'Table'[NUM_CANTIDAD])
My problem is I need to calculate the percentage (SoldUnits / TotalUnits) but if I put the second measure into a Table visualization, things go into trouble and a total is calculated per row.
I would need to calculate a total by ID_ARTICULO and ID_SEDE and put the measure into a table Visual. In my example, the result would be like this:
| FEC_VENTA | ID_SEDE | ID_ARTICULO | COD_PROMOCION | NUM_CANTIDAD | TOTAL | %Units |
| 07-may-23 | A | A | XX | 2 | 33 | 6.06 |
| 08-may-23 | A | A | XX | 1 | 33 | 3.03 |
| 14-jun-23 | B | B | ZZ | 1 | 1 | 100.00 |
Any help please? TKS!
Anonymous , Total unit should be like
TotalUnits = SUMX(allselected('Table') , 'Table'[NUM_CANTIDAD])
Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s
1 Reply
- amitchandakSuper User
Anonymous , Total unit should be like
TotalUnits = SUMX(allselected('Table') , 'Table'[NUM_CANTIDAD])
Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s