Forum Discussion
Formula
how to calculate and get percentages in a column?
31 Replies
- darkinvader_Resolver I
Hi Augustas-ase
So let me assume "Category" is the only column on your table visual and "Sales" is the factuals.
DAX formula below:% Sales =
var _sumOfSales = Sum(Table'Sales')var _percent = Calculate(_sumOfSales,ALL(Table'Category))
return
_sumOfSales/_percent
(put your columns accordingly and change the data presentation to %)
Please do hit like if this provides you with a solutionRegards
darkinvader
- Augustas-aseHelper II
i cant use Sum, becouse is measure
- BIswajit_DasImpactful Individual
Hello Augustas-ase here's something that may be helpfull
- Augustas-aseHelper II
or how can i multiply this? sales 2022 x %ct sales 2022
- BIswajit_DasImpactful Individual
For any calculations you need to use calculated columns or measure
- Augustas-aseHelper II
all i get 100%
- Augustas-aseHelper II
how to make, for example, that '2sale2s2' is calculated for each month 100% for each month, instead of for the whole year
- BIswajit_DasImpactful Individual
Hello Augustas-ase
If you want to view percentage on the matrix visual then you can also do this
- Augustas-aseHelper II
its cool, but how to get this in measure?
i want to multiply it with forx example: sales * %gt sum .....
- Augustas-aseHelper II
and how to get a new measure with %??
- darkinvaderFrequent Visitor
If you're already have measure for _sumOfSales then just replace _sumOfSales with your measure. Here in the above calculation "ALL" is playing the major role which will sum all the value regardless of the columns, so no need to worry about summing it.
- Augustas-aseHelper II
i cant use sum in the formula:
var _sumOfSales = Sum(Test(Sales 2022) , becouse Sales 2022 is Measure, and i cant to choice it- darkinvader_Resolver I
Hi Augustas-ase ,
this what you can do I feel,% Sales =
var _sumOfSales = [Sales 2022] <- your measure here.var _percent = Calculate(_sumOfSales,ALL(Table'Category))
return
_sumOfSales/_percent