Forum Discussion

LuisNC's avatar
LuisNC
Helper I
3 years ago
Solved

Data Bars in a Table

Hello Dear Community, There's something I don't understand about data bars. In the example below, the total amount of sales is 1,56 M, and the top customer (the list is arranged by total sales) app...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi LuisNC ,

    When you set the conditional formatting with data bars, you can only set the maximum and minimum values, you can't set them as percentages. So we need to create a percentage column and then set the conditional formatting for it. I created a sample pbix file(see the attachment), please check if that is what you want.

    1. Create a measure as below to get the percent of per customer 

    Percent = 
    VAR _allamount =
        CALCULATE ( SUM ( 'Table'[Amount] ), ALL ( 'Table' ) )
    RETURN
        DIVIDE ( SUM ( 'Table'[Amount] ), _allamount )

    2. Add the new measure on the visual and configure conditional formatting for it as below screenshot

    If the above one can't help you, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

    How to provide sample data in the Power BI Forum

     

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards