Forum Discussion
Help calculating percentages for a graph
- 4 years ago
Hi BruCe05
Please create a measure instead of a calculated column. This is more recommendable.
Percent = DIVIDE(SUM('Table'[sales]),SUM('Table'[calls]))If you want to have it in a calculated column, try below DAX
% = DIVIDE(CALCULATE(SUM('Table'[sales]),ALLEXCEPT('Table','Table'[Date])),CALCULATE(SUM('Table'[calls]),ALLEXCEPT('Table','Table'[Date])))Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
BruCe05 , You have two option
% = Divide(sum(Table[Call]), Sum(Table[Sales]))
or
% 1 = sumx(values(table[Day]), Divide(sum(Table[Call]), Sum(Table[Sales])) )
- BruCe054 years agoNew Member
Hi amitchandak thank you for your message!
Sadly it didn't work. For both solutions, all lines in the calculated column returns the same value.
I hoped that it was just a displaying option for the graph, but from your reply I assumed it will need to be a differente formula, right? In this case is maybe an equivalent to Excel's sumifs possible? What do you think?
- v-jingzhang4 years ago
Community Support
Hi BruCe05
Please create a measure instead of a calculated column. This is more recommendable.
Percent = DIVIDE(SUM('Table'[sales]),SUM('Table'[calls]))If you want to have it in a calculated column, try below DAX
% = DIVIDE(CALCULATE(SUM('Table'[sales]),ALLEXCEPT('Table','Table'[Date])),CALCULATE(SUM('Table'[calls]),ALLEXCEPT('Table','Table'[Date])))Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.