Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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:

SoldUnits = SUMX(FILTER('Table', NOT(ISBLANK('Table'[COD_PROMOCION]))), 'Table'[NUM_CANTIDAD])

Also a total sold units by article measure (with or without 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_VENTAID_SEDEID_ARTICULOCOD_PROMOCIONNUM_CANTIDADTOTAL%Units
07-may-23AAXX2336.06
08-may-23AAXX1333.03
14-jun-23BBZZ11100.00

 

Any help please? TKS!