Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

% total category wise

Hello Everyone,

 

I made a bar chart where the percentages are showing based on the total grand total. i.e in case of  region rawalpindi 11.5 % was sold from the total grand total through channel X. I want to show the share of the channel based on sales of region rather than grand total . For e.g total sales of all region combined is 1000. Total sales from rawalpinidi is 400. The percentage 11.5% is out of a total 1000. I want percentage to be shown based on the regional sales for the two channels. Can anyone help me how should I make a measure or show this? 

 

 

  • Hi Anonymous 

     

    You could create a measure like this:

    Percent of Region = DIVIDE(SUM('Table'[Sales]),CALCULATE(SUM('Table'[Sales]),ALLEXCEPT('Table','Table'[Region])))

    For example, raw data & result

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

2 Replies

  • Anonymous , Try a measure like

    Divide([sales], calculate([sales],filter(allselected(Table, Table[Region] = max(Table[Region]) ))))

     

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    You could create a measure like this:

    Percent of Region = DIVIDE(SUM('Table'[Sales]),CALCULATE(SUM('Table'[Sales]),ALLEXCEPT('Table','Table'[Region])))

    For example, raw data & result

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.