Como calcular o valor da coluna (FAIXA TEMPO) distribuído em colunas abaixo com valor de cada periodo (ACIMA DE 24H, AC DE 4H ETC...) dividido pelo valor total de cada período?
O Objetivo é achar o percentual entre as FAIXA TEMPO dividido pelo valor total de cada período
exemplo: Jun/21 --> Em branco (45/12684) Acima de 12h (2513/12684) Acima de 24h (2434/12684) Acima de 4h (2583/12684)
21/jul--> Em branco (30/13206) Acima de 12h (2545/13206) Acima de 24h (3037/13206) Acima de 4h (2707/13206)
Solved! Go to Solution.
Hi @Victor1986 ,
Below is my test table:
Create five measure and add it to table visual:
Total =
SUMX (
'Table 1',
[Em branco] + [DE 12h] + [DE 24h] + [DE 4h] + [DE 7Dias] + [ATE 4h]
)
Em/Total =
VAR cur_em =
SELECTEDVALUE ( 'Table 1'[Em branco] )
VAR a =
DIVIDE ( cur_em, 'Table'[Total] )
RETURN
a
DE 12h/Total =
VAR cur_12 =
SELECTEDVALUE ( 'Table 1'[DE 12h] )
VAR a =
DIVIDE ( cur_12, 'Table'[Total] )
RETURN
a
DE24/Total =
VAR cur_24 =
SELECTEDVALUE ( 'Table 1'[DE 24h] )
VAR a =
DIVIDE ( cur_24, 'Table'[Total] )
RETURN
a
DE 4h/Total =
VAR cur_4 =
SELECTEDVALUE ( 'Table 1'[DE 4h] )
VAR a =
DIVIDE ( cur_4, 'Table'[Total] )
RETURN
a
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Victor1986 ,
Below is my test table:
Create five measure and add it to table visual:
Total =
SUMX (
'Table 1',
[Em branco] + [DE 12h] + [DE 24h] + [DE 4h] + [DE 7Dias] + [ATE 4h]
)
Em/Total =
VAR cur_em =
SELECTEDVALUE ( 'Table 1'[Em branco] )
VAR a =
DIVIDE ( cur_em, 'Table'[Total] )
RETURN
a
DE 12h/Total =
VAR cur_12 =
SELECTEDVALUE ( 'Table 1'[DE 12h] )
VAR a =
DIVIDE ( cur_12, 'Table'[Total] )
RETURN
a
DE24/Total =
VAR cur_24 =
SELECTEDVALUE ( 'Table 1'[DE 24h] )
VAR a =
DIVIDE ( cur_24, 'Table'[Total] )
RETURN
a
DE 4h/Total =
VAR cur_4 =
SELECTEDVALUE ( 'Table 1'[DE 4h] )
VAR a =
DIVIDE ( cur_4, 'Table'[Total] )
RETURN
a
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sanitized sample data that fully covers your issue. I cannot help you without usable sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
92 | |
34 | |
33 | |
17 | |
13 |
User | Count |
---|---|
93 | |
28 | |
23 | |
16 | |
16 |