cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## Getting First row value in Total Column of the mattrix visual

Hi i am using this formula calculate the Ratio %

Ratio_PC =
var Nozzle= CALCULATE(sum(Sales[UNITS]),filter(sales,Sales[SAL_CAT_TYPE]="NOZZLE"))
var Electrode= CALCULATE(sum(Sales[UNITS]),filter(sales,Sales[SAL_CAT_TYPE]="ELECTRODE"))
VAR Retaining_cap= CALCULATE(sum(Sales[UNITS]),filter(sales,Sales[SAL_CAT_TYPE]="RETAINING CAP"))
VAR Shield= CALCULATE(sum(Sales[UNITS]),filter(sales,Sales[SAL_CAT_TYPE]="SHIELD"))
VAR Swirl_Ring= CALCULATE(sum(Sales[UNITS]),filter(sales,Sales[SAL_CAT_TYPE]="SWIRL RING"))
var Blank_Col= CALCULATE(sum(Sales[UNITS]),filter(sales,Sales[SAL_CAT_TYPE]=BLANK()))
var Total_Units= CALCULATE(sum(Sales[UNITS]),all(Sales[SAL_CAT_TYPE]))

RETURN

if(Electrode,DIVIDE(Electrode,Total_Units),
if(Nozzle,DIVIDE(Nozzle,Total_Units),
if(Retaining_cap,DIVIDE(Retaining_cap,Total_Units),
if(Shield,DIVIDE(Shield,Total_Units),
if(Swirl_Ring,DIVIDE(Swirl_Ring,Total_Units),0
)))))

But if you see the visual in Ratio_pc rows the first Electrode value is 27.18% showing in total column which not correct it should be 100%

can anybody explain why i am facing this.

@amitchandak any solution?

0 REPLIES 0