cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adelmonte
Resolver I
Resolver I

Single row Percentage of the Total based on all selected filters

Hi,
Would someone be able to help me with the percentage of Total per single row.
I would like to achieve in Power BI dynamically something that I can do in Excel manually.
Table is "Total Volume" column is "Delivered" I need to obtain the percentage as the formula next describes.
Avoiding 2 decimals after the percentage i.e. 17,02% -> 17%

adelmonte_0-1666184498704.png

Thanks,
Alex

 

1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @adelmonte ,

Please try below steps:

1. below is my test table

vbinbinyumsft_1-1666248738638.png

 

2. create a measure with below dax formula

 

Measure =
VAR cur_del =
    SELECTEDVALUE ( 'Table'[Delivered] )
VAR total =
    SUMX ( ALL ( 'Table' ), [Delivered] )
RETURN
    IF ( HASONEVALUE ( 'Table'[Delivered] ), DIVIDE ( cur_del, total ), 1 )

 

3. add a table visual with measure and fields

 

vbinbinyumsft_0-1666248718575.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
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

1 REPLY 1
v-binbinyu-msft
Community Support
Community Support

Hi @adelmonte ,

Please try below steps:

1. below is my test table

vbinbinyumsft_1-1666248738638.png

 

2. create a measure with below dax formula

 

Measure =
VAR cur_del =
    SELECTEDVALUE ( 'Table'[Delivered] )
VAR total =
    SUMX ( ALL ( 'Table' ), [Delivered] )
RETURN
    IF ( HASONEVALUE ( 'Table'[Delivered] ), DIVIDE ( cur_del, total ), 1 )

 

3. add a table visual with measure and fields

 

vbinbinyumsft_0-1666248718575.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors