cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Displaying percentages in a bar chart: Apparent multiplication issue??

This has got me rather confused. 

 

The following code creates a collection that is used later on in the app to drive a bar chart. The collection is 'col_costanalcompare'. 

 

ClearCollect(
    Col_CostAnal_SingleProject,
    Sort(
        AddColumns(
            Filter(
                Table_CostAnal,
                Project_ID exactin Col_ProjectDetails_SingleProject.ProjectCode
            ),
            "Percent_Pie",
            Text(Round(Rate*100,1)&"%"),
            "Percent_DirectIndirect_Pie",
            Text(Round(Quantity*100,1)&"%"),
            "Expanded",
            false,
            "Shown",
            Not("," in ID_Number)

        ),
        ID_Number,
        Ascending
    )
);​

As you can see attached, it features a couple of 'percent' columns, 'Percent_Pie' and 'Percent_DirectIndirect_Pie'.

(a short explanation of the name choice: they were originally intended to be used with pie charts). 

 

In both cases, I multiply each entry in a separate column, 'rate', by 100 to get the desired value to place in the percent_pie and percent_directindirect_pie columns. I have checked the collections and the relevant values are stored correctly (11%, 3% etc). 

 

The graph's items are set to 'col_costanalcompare' and Series1 is set to 'Percent_Pie'. The graph screengrab shows the rates in hundredths, eg 0.11, 0.03. I have no idea why this is; is there some setting that needs to be changed? 

 

Is there any way to fix this? Also, is there a way to move the percentages on the X axis to the top of each bar?

 

Thanks. 

 

 

 

 

 

1 REPLY 1
v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

The Y axis value is based on the Series value that you specified within your Line Chart control, and it is generated automatically. Currently, we could not format the Y axis value into the percentage format you want within Column Chart control in PowerApps.

If you want to move the X axis label to the top of each bar, just try to enable the Markers property. As the same with Y axis label value, it also show as decimals.

As an alternative workaround to show the Markers as percentage is to multiply the data by 100 and Set "%" to MarkerSuffix property of the Column Chart control.

Best regards,

Sik

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (32,276)