dax total
6 TopicsMeasure that Adds a Measure's Result
Hi, good day! I am currently working on obtaining the total sales for our company. For me, the easiest way to calculate the total sales is by adding a new column [New Column = SP * QTY]. However, I don't want to use a new column because I need to apply this calculation to each partition of the Fact Table in SSAS, and we already have a lot of partitions. That's why I need your help. Is there any way to use a measure for this? Here's the sample: Measure to get the Sales >> Sales = SUM(Sheet1[QTY]) * SUM(Sheet1[SP]) And now I want to add the Sales by Group, but I don't know how to create a measure to get 2850 & 3650. (In this pic, I used a calculated column not measure) Can somebody help me? Thanks in Advance 🙂Solved593Views0likes2Commentsmeasure is returing wrong total value in table visual
hi everyone i have created a measure that calculates the sales agents incentive. it's returning value per row correct but the total value in the table visual is wrong the measure is : new agent incentive = CALCULATE([new commissin sum]*max('Agent Rate Key'[Agent Rate])) new commission sum measure : new commissin sum = Sumx(Summarize('categories trans','categories trans'[categories summarize],'categories trans'[base type without zeed], "_1", [new commission calculation]), [_1]) new commission calculation measure : new commission calculation = IF([new achiev %]<= 0.8999,0, IF(([new achiev %]>=.90 &&[new achiev %]<=.9499),300-(.1*300), IF([new achiev %]>=.95 &&[new achiev %]<=.9999,300-(.05*300), IF([new achiev %]>=1 &&[new achiev %]<=1.09,300, IF([new achiev %]>= 1.1 &&[new achiev %]<=1.1999,300+(.1*300), IF([new achiev %]>=1.2 &&[new achiev %]<=1.29999,300+(.2*300),IF([new achiev %]>=1.3,300+(.3*300),0)))))))954Views0likes5CommentsHow to make Fixed Totals & Subtotals (filter independent)
How to make Fixed Totals & Subtotals? Example (two identical matrix - just row order is different): Problem: when I filter by year or product, subtotals are recalculated, but I want to see global fixed subtotals (by another words the same subtotals as on screen above) Is it possible? Download Source FileSolved824Views0likes2Commentsdax calculation total is incorrect
im trying to calculate return on investement for stocks data based on the formula ( current price-initial cost)/initial cost. i calculated first the initial cost ( purchased amount * number of stocks purchased) then the current position price as: (current price* number of stocks purchased) and finally i want to get Profit/Loss amount and Profit/Loss %. simply i subtracted : current price-initial cost and for the percentage i calculated it as:( current price-initial cost)/initial cost. the result is correct for indivisual stock but the overall total purchased amount value, Profit/Loss value and percentage is incorrect in the total , it's taking the sum(last closing price) * sum (number of stocks purchased): 53*135934=7204502 which is wrong. the correct result should be the sum of column 4693.579996 which is the sum of all values in the amount purchased column. the line chart is also showing incorect percentages in the overall return but only correct values for indiviual stocks the used DAX measures amount purchased value = CALCULATE(SUM('user portfolio'[number of stocks purchased])*[last closing price]) p&l = CALCULATE([amount purchased value]-SUM('user portfolio'[Amount Purchased])) p&l % = CALCULATE(([amount purchased value]-SUM('user portfolio'[Amount Purchased]))/SUM('user portfolio'[Amount Purchased]),FILTER('stocks data','stocks data'[date diff]>=0)) puchasing date diff column = DATEDIFF(RELATED('user portfolio'[Date Purchased]),'stocks data'[Date],DAY) any idea on how to fix the calculation to show the correct overall profit/loss value and percetage? note: when calcuting ROI there are other things taken into consideration like : dividend, commission fees, etc. and this example is just a simple case 🙂Solved1.3KViews0likes4CommentsTotal when ratio's are part of formula
Trying to find the correct total here. I'd like to see a total of 313, it being the sum of the rows. The 313 on row level is calculated as follows: 13,03% of revenues on this client * 2.400 total procured material in the month. For grand total it's now calculating the total % revenue, being 14,29% * 2.400. I probably need to create a virtual table, and/or SumX, but I can't get it to work 😑 Please help me out here.Solved803Views0likes3Comments