Forum Discussion

jlankford's avatar
jlankford
Advocate I
8 years ago
Solved

Filtering a value in pie chart without changing other value's percentages

Hello.    This issue is very simple to describe, but I've exhausted all I know on how to address it within Query or Dax.    I have a dataset. For simplicity, let's say it looks like this:   APP...
  • Smauro's avatar
    8 years ago

    Hey jlankford I have just checked, and --at least in the free version of-- Donut Chart by ZoomCharts there is no option to select how the Data Labels are displayed.

    In a normal donut / pie chart though, there is.
    I have tested this measure:

    CostPerc =
    VAR y =
        SUM ( [Value] ) + 0
    VAR x =
        CALCULATE ( SUM ( [Value] ), ALL ( Table ) )
    RETURN
        DIVIDE ( y, x, 0 )

    In modeling, you can choose to display it as a percentage. This measure always calculates the complete total value, thus even if you filter out one or more IDs the other IDs' percentage won't change.

  • jlankford's avatar
    jlankford
    8 years ago

    Thank you very much! I just realized that I was making this WAY harder than it had to be. By calculating share of total, and then using that value independently of the "percentage" calculated by the pie, I simply display values.