Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Victor1986
Helper I
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

 

Victor1986_0-1659621932441.png

 

3 ACCEPTED SOLUTIONS
amitchandak
Super User
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]) ) )

View solution in original post

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

Victor1986_0-1659705700078.png

 

consegue me ajudar?

View solution in original post

foucaultf
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.

foucaultf_0-1660039517560.png   

picture 1

 

 foucaultf_1-1660039517562.png

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.

foucaultf_2-1660039517563.png

 

Best Regards,

View solution in original post

3 REPLIES 3
foucaultf
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.

foucaultf_0-1660039517560.png   

picture 1

 

 foucaultf_1-1660039517562.png

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.

foucaultf_2-1660039517563.png

 

Best Regards,

amitchandak
Super User
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]) ) )

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

Victor1986_0-1659705700078.png

 

consegue me ajudar?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors