Formula workshop - formula editor in crystal report - crystal-reports-2008

I have something like this
quantuty 10,10,15,20,30
price per piece 2,2,5,7,4
I want to calculate total price for each row and sum all this
I use formula
Sum ({ESTIMATE_ITEMS.QUANTITY} * {ESTIMATE_ITEMS.PRICE_PER_PIECE} )
And I got an error mesage for this formula "A field is required here"
So what is wrong there?

Use a formula on each row that does the multiplication, then you can insert a summary summation on that formula field. In other words, take out the sum from your formula and save the formula, insert the formula as a field. Right click on the formula field and choose "insert summary" then choose "sum".

Related

DAX Measure to Create Unique Subtotal

Is it possible using DAX in power pivot to create a measure that doesn't display in the matrix under each category but only as a subtotal? The desired output would look something like below where the measure would add subcategory A and B and divide those results by subcategory C. Highlighted row below is desired output that would be shown for each category in the matrix.

Trying to get correct grand totals for my measures

I'm calculating margin impact and the grand total is not the sum of the column. Below is the calculation measure:
=([CY_MARGIN]-[PY_MARGIN])*SUM(CYPY[CY_VOL])
I've tried adding sumx(values( to the calculation but I'm still not getting the correct column sum..

How to calculate the ratio between the grand total of two metrics on Google Data Studio?

I created a table on Data Studio that shows the columns:
A: Date
B: 1st metric (number)
C: 2nd metric (number)
D: custom formula to calculate the ratio between the 1st and 2nd metric (percentage)
Then I checked the option to show the Summary Row that sums all the values of each date. But in the column D I don't want it to calculate the sum of the values in column D (nor the average of the values), instead, I want the ratio between the sum of the values of column D and C. How to achieve that?
To have the calculated field correctly in the total, you have to make sure to aggregate your calculated field. To do so, use 'sum()' in your calculation.
That would be this formula:
sum(total sales)/sum(gross sales)
I hope this answers your question!

In PowerBI, how to expand row values in a matrix and keep showing subtotals

In Power BI, I have the next problem. I have a matrix with subtotals and I want to expand one of the subtotals and continue seeing the value of the rest subtotals, but they disappear when I expand one of the subtotals. How can I do to continue showing those values?
Original Matrix
Expanded Matrix
I have highlighted in yellow where I would like to continue seeing the subtotal (like in the original matrix when it wasn't expanded).
PS: I have the option Row Subtotals On
Thanks!

how to calculate sum of an average field in crystal report

I have a field that calculates an average per row (Avg_Amt), it gives a correct output. My problem is how can I calculate the total summary of the average field (Avg Amt) then place it to the report footer.
Thanks & Best Regards.
Create 2 formula fields one for average and one for sum and insert this formula the first one
formula = Average ({Feild Name})
in the second formula from the report fields drag and drop the average formula and add the sum operation like :
formula = SUM({#Average})
If it is a straight average, use the sum wizard to add a sum for each field, then insert a formula field see below, this will actually get you to the accurate basis points average
(Sum ({#Field_1})/Sum ({#Field_2}))*100

Resources