cancel
Showing results for
Did you mean:
Helper I

## Calcular total de faixas acima de 12h acima de 24h acimas de 4h acima de 7dias até 4h dividido

Como calcular total de faixas ... acima de 12h... acima de 24h... acimas de 4h... acima de 7dias... até 4h ...dividido pelo total de cada periodo para obter a porcentagem

3 ACCEPTED SOLUTIONS
Super User

@Victor1986 , You want to get month total of say measure M1

then

calculate([m1], filter(allselected(Date), Date[Period]  = max(Date[Period]) ) )

or

calculate([m1], filter(allselected(Date[Period]  ), Date[Period]  = max(Date[Period]) ) )

!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Helper I

Bom dia  @amitchandak

Necessito calcular a coluna (FAIXAS DE TEMPO) que contempla os valores abaixo na tabela, de acima de 12h, acima de 24h, acima de 4h etc... 21 etc.) dividido pelo TOTAL de cada periodo

consegue me ajudar?

Frequent Visitor

Hi @Victor1986 ,

Please try following steps:

1.Is your data as shown picture 1 ? You may need to transform the data from the picture 1 to picture 2.

picture 1

picture 2

2.you need to create a measure called total.

``total = SUMX('table2','table2'[column]+'table2'[ATE 4h]+'table2'[ACIMA DE 7Dias]+'table2'[ACIMA DE 4h]+'table2'[ACIMA DE 24h]+'table2'[ACIMA DE 12h]) ``

3.Create the following measure to calculate the percentage for each column.

``````ACIMA DE 12h% =
VAR ACIMADE12hsum = SUM('table2'[ACIMA DE 12h])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE12hsum,total)
RETURN
column_percentage

ACIMA DE 24h% =
VAR ACIMADE24hsum = SUM('table2'[ACIMA DE 24h])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE24hsum,total)
RETURN
column_percentage

ACIMA DE 4h% =
VAR ACIMADE4hsum = SUM('table2'[ACIMA DE 4h])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE4hsum,total)
RETURN
column_percentage

ACIMA DE 7Dias% =
VAR ACIMADE7Diassum = SUM('table2'[ACIMA DE 7Dias])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE7Diassum,total)
RETURN
column_percentage

ATE 4h% =
VAR ATE4hsum = SUM('table2'[ATE 4h])
VAR total = [total]
VAR column_percentage = DIVIDE(ATE4hsum,total)
RETURN
column_percentage

column% =
VAR columnsum = SUM('table2'[column])
VAR total = [total]
VAR column_percentage = DIVIDE(columnsum,total)
RETURN
column_percentage``````

4.In report page, you can get result you want.

Best Regards,

3 REPLIES 3
Frequent Visitor

Hi @Victor1986 ,

Please try following steps:

1.Is your data as shown picture 1 ? You may need to transform the data from the picture 1 to picture 2.

picture 1

picture 2

2.you need to create a measure called total.

``total = SUMX('table2','table2'[column]+'table2'[ATE 4h]+'table2'[ACIMA DE 7Dias]+'table2'[ACIMA DE 4h]+'table2'[ACIMA DE 24h]+'table2'[ACIMA DE 12h]) ``

3.Create the following measure to calculate the percentage for each column.

``````ACIMA DE 12h% =
VAR ACIMADE12hsum = SUM('table2'[ACIMA DE 12h])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE12hsum,total)
RETURN
column_percentage

ACIMA DE 24h% =
VAR ACIMADE24hsum = SUM('table2'[ACIMA DE 24h])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE24hsum,total)
RETURN
column_percentage

ACIMA DE 4h% =
VAR ACIMADE4hsum = SUM('table2'[ACIMA DE 4h])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE4hsum,total)
RETURN
column_percentage

ACIMA DE 7Dias% =
VAR ACIMADE7Diassum = SUM('table2'[ACIMA DE 7Dias])
VAR total = [total]
VAR column_percentage = DIVIDE(ACIMADE7Diassum,total)
RETURN
column_percentage

ATE 4h% =
VAR ATE4hsum = SUM('table2'[ATE 4h])
VAR total = [total]
VAR column_percentage = DIVIDE(ATE4hsum,total)
RETURN
column_percentage

column% =
VAR columnsum = SUM('table2'[column])
VAR total = [total]
VAR column_percentage = DIVIDE(columnsum,total)
RETURN
column_percentage``````

4.In report page, you can get result you want.

Best Regards,

Super User

@Victor1986 , You want to get month total of say measure M1

then

calculate([m1], filter(allselected(Date), Date[Period]  = max(Date[Period]) ) )

or

calculate([m1], filter(allselected(Date[Period]  ), Date[Period]  = max(Date[Period]) ) )

!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Helper I

Bom dia  @amitchandak

Necessito calcular a coluna (FAIXAS DE TEMPO) que contempla os valores abaixo na tabela, de acima de 12h, acima de 24h, acima de 4h etc... 21 etc.) dividido pelo TOTAL de cada periodo

consegue me ajudar?