I currently have a saved search that populates a list of items.
My current results are standard NetSuite fields which are "Name", "Description", "Type", "Average Cost" & "Available"
I am trying to add another column for a formula that multiplies the Average Cost by the Available to give me the Value of the Available SOH.
In your saved search results add a new field of type formula(numeric). In the formula popup window use this formula:
NVL({averagecost}, 0) * NVL({quantityavailable}, 0)
This will multiply the average cost and quantity available together and give you the result. I put the NVL in there in case an item doesn't have an average cost or quantity available you won't get an error.
Related
I am trying to create a measure that would count the instances when another measure is between given values.
The first is a measure of forecast accuracy, which is calculated over products and customers with a target value of 1. Then I would like to make a monthly report which shows for how many products the forecast accuracy is less than .85, between 0.85 and 1.15 and over 1.15.
The measure I tried for the middle category, which does not give the desired result:
var tab = SUMMARIZE(data, data[ComponentNumber], "Accuracy", [Forecast accuracy])
return SUMX(tab, IF([Accuracy] > 0.85 && [Accuracy] < 1.15, 1, 0))
The data table has also a customer number, which is why I tried first evaluating the measure [Forecast accuracy] only over components, disregarding the customers.
One source of the problem may lie in the fact that the measure [Forecast accuracy] is calculated as a division of two measures [Ordered Quantity] and [Forecast Quantity], of which the former is in another table. Does this affect the evaluation of my attempted measure?
Is it possible with webdatarocks to calculate % of difference per row for each period?
I want to add 3rd column and get % od difference for "Sum of foodDonorDelta" so for 30/09/2020 it will be null, for 31/10/2020 it will be 4000%, for 30/11/2020 it will be -78% and for 31/12/2020 it will be 1000%.
I Know I can set "% Difference" in fields options
but then I have to move "Values" to "Rows" while I need them in "Columns"
The %difference aggregation function of WebDataRocks has the following logic:
If the Values are in Rows, the %difference will be calculated based on the Sum row. In case Values are in Columns, the %difference will be calculated based on the Sum column.
So it is possible to calculate the %difference between Sum values per row, but only when the Values are in Rows.
I have a list of products and would like to get a 50 day simple moving average of its volume using Power Query (M).
The table is sorted by product name and date. I add a custom column and applied the code below.
if [date] >= #date(2018,1,29)
then List.Average(List.Range(Source[Volume],[Volume]-1,-50))
else ""
Since it is already sorted by date and name, an if statement was applied with a date as criteria/filter. However, an error occurs that says
'Volume' column not found in the table.
I expect to have an added column in the power query with volume 50 day moving average per product. the calculation to be done if date is greater than or equal Jan 29, 2018.
We don't know what your columns are, but assuming you have [product], [date] and [volume] in Source, this would average the last 50 days of [volume] for the identical [product] based on each [date], and place in a new column
AvgAmountAdded = Table.AddColumn(Source, "AverageAmount", (i) => List.Average(Table.SelectRows(Source, each ([product] = i[product] and [date]<=i[date] and [date]>=Date.AddDays(i[date],-50)))[volume]), type number)
Finally! found a solution.
First, apply Index by product see this post for further details
Then index again without criteria (index all rows)
Then, apply below code
= Table.AddColumn(#"Previous Step", "Volume SMA(50)", each if [Index_byProduct] >= 50 then List.Average(List.Range(#"Previous Step"[Volume], ([Index_All]-50),50)) else 0),
For large dataset, Table.Buffer function is recommended after index-expand step to improve PQ calculation speed
I have transactions in a variety of currencies in a Transaction table (columns TransactionAmount and TransactionCurrency), and also a related Currency table:
Using the column RateToEuro I have been able to convert all my transaction amounts, using a calculate column, into euros:
An example of what I would like: I want to select in my report filter 'Dollar' and then the Transaction amount should convert all original transaction amounts to dollars. So in my example above, the $2052 original trx amount will be 2052 also in the 'Transaction amount ($)' column.
[EDIT:]
Currently I have created measure that gets the filter value:
CurrencyFilter = IF(LASTNONBLANK('CurrencyFormat'[Name], 1) = "USD", "USD", "EUR")
And a calculated column that for each transaction calculates the converted transaction amount (depending on the report filter chosen):
TransactionAmountConverted = CALCULATE(VALUES(Transactions[TransactionAmount]) * (IF([CurrencyFilter] = "EUR", VALUES('Currency'[RateToEuro]), VALUES('Currency'[RateToDollar]))))
But for some reason the IF statement always returns TRUE (i.e. always uses the RateToEuro column).
Any hint or tip to point me in the right direction would be much appreciated!
Currently this is not possible in Power BI: it is not supported that a calculated column uses a slicer value.
A measure can be used to get the slicer value, but in this particular case (if one value for each row is required to be calculated), there is no solution possible unfortunately.
i add you my view of my report
a busy cat http://s3.subirimagenes.com:81/imagen/previo/thump_7631306captura.png
You can see that the group parent is NOM CLIENTE (ACCOUNT) after it has a
child group called fecha(date) after every fecha(date) has a few pro
code (product code), and every pro code has a cantidad(quantity), and
every (pro codigo * cantidad) (product code * quantity) has its
importe(amount) so, every fecha(date) has its importe (its total
quantity bought that day) now every client has a total quantity (all
his/her purchases) and now i want to sort my report but this last
total quantity, you could see
837,25000
549,60000
1004,0000
369,50000
464,50000
the order should be:
1004,0000
837,25000
549,60000
464,50000
369,50000
when i do a sorting on the upper left corner and i put this function on the sort tab
=Sum(Fields!importe.Value)
i get this message:
an error ocurred during local report processing. the definition of the
report /best_accounts is invalid A sort expression for the tablix
'Tablix4' includes an aggregate function. Aggregate functions cannot
be used in data row sort expressions.
then how can i sorted as i want?
go to the matrix proprieties
select the group's tab
select the group's row and edit it
you should see a sorting tab.
enter the total expression and select ASC or DESC
A sort expression for the tablix ‘Tablix3’ uses the function RowNumber. RowNumber cannot be used in sort expressions.