IF(
[Pair types] = "used pair",
([Quantity] / SUM(SELECT(scan sheet [Quantity], [Pair types] = "used pair"))) * 100,
0
)
Percentage calculation showing "0"
Solved! Go to Solution.
Please take a look at the below tip by @Steve
Fix for expression giving 0% or missing decimal pa... - Google Cloud Community
Please try
IF(
[Pair types] = "used pair",
([Quantity]*1.00 / SUM(SELECT(scan sheet [Quantity], [Pair types] = "used pair"))*1.00) * 100.00,
0
)
SUM(SELECT(SCAN SHEET[Quantity], [PAIR TYPES] = "Used pair")) / SUM(SCAN SHEET[Quantity]) * 100
But showing results "0" please me
Please take a look at the below tip by @Steve
Fix for expression giving 0% or missing decimal pa... - Google Cloud Community
@Sirfyaad wrote:SUM(SELECT(SCAN SHEET[Quantity], [PAIR TYPES] = "Used pair")) / SUM(SCAN SHEET[Quantity]) * 100
Thank you for your Response @Suvrutt_Gurjar
Please tell me why the error is showing here. If I have made any mistake in the expression, please correct me.
Please take a look at the tip by @Steve . He has explained it very well why it results in 0
Please make your column type decimal and please try the below expression.
SUM(SELECT(SCAN SHEET[Quantity], [PAIR TYPES] = "Used pair")) / SUM(SCAN SHEET[Quantity]) * 100.00
or try the following
SUM(SELECT(SCAN SHEET[Quantity], [PAIR TYPES] = "Used pair")) /DECIMAL( SUM(SCAN SHEET[Quantity]) * 100)
Please try
(SUM(SELECT(SCAN SHEET[Quantity], [PAIR TYPES] = "Used pair")) /DECIMAL( SUM(SCAN SHEET[Quantity])))* 100
In the earlier expression shared by you, I think the multiplication by 100 was happening just to the denominator, One needs to multiply by 100 to the entire result.
User | Count |
---|---|
39 | |
32 | |
30 | |
16 | |
14 |