Forum Discussion
Sum Total
- 3 years ago
Hi sarikei ,
Please create following measures:
Sales = SUM('Table'[Sales Volumn]) TotalSales = CALCULATE(SUM('Table'[Sales Volumn]),ALL('Table')) % = DIVIDE([Sales],[TotalSales])The result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi sarikei ,
without seeing your data the solution would typically look like this or similar:
ShareOfYear =
var var_CurrentValue = [YourMeasure]
var var_ValueofYear = CALCULATE([YourMeasure],ALL(DateTable[MonthColumn])
var var_ShareofCurrentValue = DIVIDE(var_CurrentValue,var_ValueofYear)
Return
var_ShareofCurrentValue
In best case you have a separate date table. It is important that you put for [MonthColumn] the column you use in your visual.
If you also apply a quarter column then you need to add ",ALL(DateTable[QuarterColumn])" behing the other ALL() function. If there are more columns to be ignored also ALLEXCEPT() instead of ALL() could help.
If this does not work please share the data model, your measure, the visual as well as filter applied to the visual (sample data is totally fine) then it is easier to help.
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
- sarikei3 years agoHelper I
Hi,
sorry, I should have included the dataset. For example:
Month Sales Volumn Total Sales Volumn % Sales Volumn 2021-10 226 2248 10.05% 2021-11 281 2248 12.50% 2021-12 150 2248 6.67% 2022-01 123 2248 5.47% 2022-02 208 2248 9.25% 2022-03 226 2248 10.05% 2022-04 157 2248 6.98% 2022-05 218 2248 9.70% 2022-06 140 2248 6.23% 2022-07 171 2248 7.61% 2022-08 220 2248 9.79% 2022-09 128 2248 5.69% 1. Total Sales Volumn is what I want to sum. This is the total of Sales Volumn of all the all Month.
2. Then I will use this measure (Total Sales Volumn) to calculate the % Sales Volumn (fomular is Sales Volumn / Total Sales Volumn).
3. So I will include this 3 measure in the Column Chart.
Thank you in advance.
- v-yadongf-msft3 years agoCommunity Support
Hi sarikei ,
Please create following measures:
Sales = SUM('Table'[Sales Volumn]) TotalSales = CALCULATE(SUM('Table'[Sales Volumn]),ALL('Table')) % = DIVIDE([Sales],[TotalSales])The result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
v-yadongf-msft i have one doubt if i am select any particular Date is ther any possible to change total sales values based sales ?
- Mikelytics3 years agoResident Rockstar
Hi sarikei
Please use the following measure:
ShareOfYear = var var_CurrentValue = SUM(Table[Sales Volumn]) var var_ValueofYear = CALCULATE(SUM(Table[Sales Volumn]),ALL(Table[Month]) var var_ShareofCurrentValue = DIVIDE(var_CurrentValue,var_ValueofYear) Return var_ShareofCurrentValueBut first you have to split the Month Column in Power Query (see split by delimeter function) or additionally create a month and a year column so that you can use the initial column for other purposes. But in the end you should have a separate year column and a separate month column.
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
- Mikelytics3 years agoResident Rockstar
Hi sarikei ,
sorry I have not read everything completely I think. So if want percentage of all rows then you should go with the solution of v-yadongf-msft .
If you only want to have the current year then you can use my solution.
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------