The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
79 | |
72 | |
48 | |
41 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
57 |