Forum Discussion

RomyL1's avatar
RomyL1
Frequent Visitor
8 years ago

Can chart visuals display formatted percentage data

Hi, I'm creating a Column Chart and a Matrix visuals with a column slicer switching between Numbers and Percentage. Both of the number and percentage are shown perfectly in the matrix visual, however, the percentage data isn't shown in the chart at all. Any idea how to display the formatted percentage data in the column chart? Thank you!!

 

Here is what I created for the measure "selectedValue" which is for the value field in both visuals:

 

selectedValue = 
IF (
ISFILTERED ('Type'[Type]) && HASONEVALUE ('Type'[Type]),
if(LASTNONBLANK ('Type'[Type], 0 )="Number",
SUM(MySchool[Number]),
if(LASTNONBLANK ('Type'[Type], 0 )="Percentage",
FORMAT(SUM(MySchool[Percentage]),"0%")
)
),
BLANK()
)

 

2 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi RomyL1,

     

    It seems that you have two tables, to get the solution, I need your data sample.

     

    If it is convenient, could you share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

     

     

    Best regards,

    Cherry

    • RomyL1's avatar
      RomyL1
      Frequent Visitor

      Hi Cherry, Thanks a lot for looking into this questoin. Currently I got an alternative solution for this question which is to create another measure and display different column/measure in the chart and matrix. But I still want to know if there is a way to display the two different data type (whole number and formatted percentage) in one chart by using the IF function. Here is the .pbix link from my one drive.

       

      PowerBI_Report.pbix

       

      Thank you!