The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I've a measure that I can't resolve the row context.
The parent result should be '11' in this case, not 4 (because round value 3,9).
What am I doing wrong ?
Solved! Go to Solution.
Hi, @maximum ;
This is normal, according to the data in your table CEILING(value, 1) function you are rounding up;
However, your formula is [Média Diária de Qtde Produto Vendido SSS]*SELECTEDVALUE.
where SELECTEDVALUE(ParamDiasEstoque[DiasAbastecerEstoque]) = 10; so the result of each row is shown in the figure; However, the totals are also rounded up according to the total of [Média Diária de Qtde Produto Vendido SSS]*10
Or you could change it
SugestaoReposicao Teste =
VAR diasParametros = SELECTEDVALUE(ParamDiasEstoque[DiasAbastecerEstoque])
// VAR qtdVendidaSSS = [Soma Qtde Produto Vendido SSS]
// VAR dias = DISTINCTCOUNT('dCalendário'[Data])
// VAR divisao = CEILING(DIVIDE(qtdVendidaSSS,dias,0),1)
// VAR qtdParam = ROUNDUP(divisao,0) * diasParametros
return
// CALCULATE(
// CEILING(diasParametros * [Média Diária de Qtde Produto Vendido SSS],1),
// ALLSELECTED(dClientes[Nome loja])
// )
sumx(SUMMARIZE('dProdutos',[Descricao + Ean],"1",
CALCULATE(
CEILING(diasParametros * [Média Diária de Qtde Produto Vendido SSS],1),
ALLSELECTED(dClientes[Nome loja])
)),[1])
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Dude, thank you so much for your help.
Hi, @maximum ;
This is normal, according to the data in your table CEILING(value, 1) function you are rounding up;
However, your formula is [Média Diária de Qtde Produto Vendido SSS]*SELECTEDVALUE.
where SELECTEDVALUE(ParamDiasEstoque[DiasAbastecerEstoque]) = 10; so the result of each row is shown in the figure; However, the totals are also rounded up according to the total of [Média Diária de Qtde Produto Vendido SSS]*10
Or you could change it
SugestaoReposicao Teste =
VAR diasParametros = SELECTEDVALUE(ParamDiasEstoque[DiasAbastecerEstoque])
// VAR qtdVendidaSSS = [Soma Qtde Produto Vendido SSS]
// VAR dias = DISTINCTCOUNT('dCalendário'[Data])
// VAR divisao = CEILING(DIVIDE(qtdVendidaSSS,dias,0),1)
// VAR qtdParam = ROUNDUP(divisao,0) * diasParametros
return
// CALCULATE(
// CEILING(diasParametros * [Média Diária de Qtde Produto Vendido SSS],1),
// ALLSELECTED(dClientes[Nome loja])
// )
sumx(SUMMARIZE('dProdutos',[Descricao + Ean],"1",
CALCULATE(
CEILING(diasParametros * [Média Diária de Qtde Produto Vendido SSS],1),
ALLSELECTED(dClientes[Nome loja])
)),[1])
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
69 | |
65 | |
63 | |
55 | |
28 |
User | Count |
---|---|
112 | |
81 | |
65 | |
48 | |
42 |