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 August 31st. Request your voucher.
Olá,
Tudo bem com todos?
Eu consigo fazer uma conta somando e multiplicando o valor resultante da linha atual com a linha anterior como se fosse um loop?
Estou tentando um CALCULATE mas não está me trazendo o valor que necessito!
Agradeço desde de já a atenção.
Solved! Go to Solution.
You need to add index column using power query. The following formula will give the the cumulative total up to the current row.
=
VAR CurrentIndex = im[Index]
RETURN
SUMX ( FILTER ( im, im[Index] <= CurrentIndex ), im[valor] )
Oi @tamerj1
Não a coluna de data é duplicada, muita das capturas foram feitas na mesma data!
Não sei se vou conseguir deixar bem claro a conta pra você pois é uma conta em C++ que pediram pra eu passar pra DAX 😅
Mas seria essa que andei tentando o retorno:
VAR
data = (im[datacaptura])
RETURN
CALCULATE ( SUM (im[valor]) FILTER (im[datacaptura] <= data))
Que devo está errando provavelmente no filter e na coluna de data por estarem repetidas as datas!!
O contexto da fórmula em C++ é comparar o valor anterior com da linha atual pra ver se o valor está dentro da porcentagem aceitável!
Que é essa :
imInferior + imatual * 0.50
Eu precisaria da coluna calculada!!!
Muito obrigada pela ajuda.
You need to add index column using power query. The following formula will give the the cumulative total up to the current row.
=
VAR CurrentIndex = im[Index]
RETURN
SUMX ( FILTER ( im, im[Index] <= CurrentIndex ), im[valor] )
Tenho uma base em que alguns motivos de contato aparecem a mesma quantidade de vezes. A fórmula
Quando os motivos possuem o mesmo contato a medida "Pareto" não se comporta somando cada linha, podem me ajudar a solucionar essa questão?
Hi @TulioAraujo789
Pretty sure there is a simpler way to handle this situation, however, this method seems to work just fine
KPI_RANKIN Pareto =
VAR CurrentValue = [KPI_QTDE MOTIVOS]
VAR CurrentContato = SELECTEDVALUE ( Ft_KPI[Motivo de contato] )
VAR AllContato = ALLSELECTED ( Ft_KPI[Motivo de contato] )
VAR CurrentRank1 = RANKX ( AllContato, CALCULATE ( SELECTEDVALUE ( Ft_KPI[Motivo de contato] ) ) )
VAR CurrentRank2 = 10000 * CurrentValue + CurrentRank1
RETURN
SUMX (
FILTER (
ADDCOLUMNS (
ADDCOLUMNS (
AllContato,
"@Value", [KPI_QTDE MOTIVOS],
"@Rank1", RANKX ( AllContato, Ft_KPI[Motivo de contato] )
),
"@Rank2", 10000 * [@Value] + [@Rank1]
),
[@Rank2] >= CurrentRank2
),
[@Value]
)
Oi @tamerj1
Muito obrigada pela ajuda !!!!
Deu super certo !!!!
Agradeço a sua atenção !!
😄
Olá @tamerj1 !!
E tenho uma coluna de data!
A que tenho é data de captura desses valores mas não sei se o filter que estou usando no argumento da sentença está errado pois está me trazendo todos os valores iguais!
A coluna de índice eu não tentei!
Coloco uma coluna de índice e permaneço com CALCULATE mesmo?
Muito obrigada pela ajuda.
Hi @Car_95
I will propose a formula for you. But I still need some clarifications
1. is the date column unique? meaning no duplicate dates?
2. what kind of calculation would like to perform? Can place one example?
3. Do you want to create a measure or a calculated column?
thank you
Hi @Car_95
do you have a unique date or index column? If not can you add an index column? If so then yes it is possible. Please provide more details about the required calculation
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
27 | |
12 | |
12 | |
12 | |
6 |