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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Victor1986
Helper I
Helper I

achar o percentual entre total de FAIXA TEMPO por periodo dividido pelo valor total de cada período

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) 

Victor1986_0-1659708776372.png

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Luca_Yu
Regular Visitor

Hi @Victor1986 ,

Below is my test table:

Luca_Yu_1-1660034860279.png

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

Luca_Yu_0-1660034833014.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Luca_Yu
Regular Visitor

Hi @Victor1986 ,

Below is my test table:

Luca_Yu_1-1660034860279.png

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

Luca_Yu_0-1660034833014.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@Luca_Yu como que voce montou a sua tabela de teste?

 

Victor1986_0-1660915388847.png

 

lbendlin
Super User
Super User

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.