I have a report in Webi 4.0 with Store name and sales revenue per store. I have created a text box and I want to display the Store name with the highest sales revenue. I can get the max value to appear with:
=Max([Sales revenue]) IN ([Store name])
This successfully shows me the highest sales revenue but what I want is the actual store name that corresponds to that value?
Any help would be much appreciated.
Thanks!
You need to change the definition of Max Sales to:
=Max([Sales revenue]) ForAll ([Store name])
Then youe Max Sales Store Name variable can be defined as:
=If([Sales revenue]=[Max Sales];[Store name])
regards
James
Related
We have set up GST application where I am getting difference between reports like monthly item wise sales report against monthly total sales report.
Please suggest me any changes I need to make for following rules:
We have 3 tables
A. Order master - single line for every order is stored with summarized values
B. Order product details - Each line item stored with respective qty, price etc.
C. Order tax details - line item wise tax details having separate row for CGST, SGST etc.
Here is how I am storing the data:
Tax is applicable on every line item [To generate final invoice all items in order group, we create some of all line items and storing value in Order Master.]
We are rounding 2 decimal value for 3 precision [eg. 4.657 = 4.66, 4.643 = 4.64] as per GST council
Rounding value is stored in Order Master table
For discount there are 2 cases
Percent based discount - Let's say if discount is 10% then from every individual line item 10% discount gets deducted than tax will be applicable for each line item
Flat discount - Let's say for 1000/- Rs order somebody wants to give 80/- Rs. discount than from each line item 8% is deducted and than tax will be applied, off course customer may not pay exact 920/- Rs. amount due to reversal of tax amount.
Now when I am generating following reports:
Monthly item wise sales report [Product wise sales report]
Monthly total sales report [Total sales]
Monthly payment type wise report [Bank, Cheque, Cash]
I am getting difference due to rounding of values. Can anyone suggest me which is the best way to set up rounding formula and up to which decimal point should I go to round the values.
I am using SQL server as backend and .net as front end technology.
I have a pivot table with multiple rows dimensions (District, Region, Shop) and months in columns. I need to calculate sales Growth ((sales this month - sales previous month)/sales previous month). As You can see from formula, i need a value from previous month (previous column). I have a formula for testing:
Sum(Total {<District={'District1'}, [Month]={'2015 09'}>} Quantity)
With this formula i am able to get the value from previous column (lets say i am calculating growth in month 2015 10 and District1). The problem is, that i get a wrong value, when this formula is used in a row with different District.
Is there any way to get district value of current row and use it in a formula? I tried multiple variations like:
Sum(Total {<District={$(District)}, [Month]={'2015 09'}>} Quantity)
Sum(Total {<District={$<=District>}, [Month]={'2015 09'}>} Quantity)
but none of them work
There is no need to add District in the calculation. QV will aggregate to it automatically since District is dimension already.
If you want to aggregate all rows under each District to show the total quantity for the whole District then you can use the following expression:
sum( total <District> Quantity )
The picture below demonstrate the result:
Also you can check the QV help (c:\Program Files\QlikView\English.chm) for the Aggr() function as well. With Aggr() function the same result can be achieved with:
aggr( NoDistinct sum( Quantity ), District )
I am using Jasper Report 4.5
My problem is I have list of employees and its monthly tax deduction.
I need the report in which it shows employees tax deduction group by monthly
and in bottom it should display total(sum of) tax deduction of each employee.
Here is one way you can do it.
Order the resultset by month, then by employee.
Create level 1 report group, group1, which groups by month and a level 2 group, group2, that groups by employee.
Create a sum variable that resets on group1.
Print the sum in the trailer of group2.
If in your detail section you have records for multiple employees/dates and then you want a total for each employee at the bottom, I think the best solution would be to use a sub report.
You could create a sub report that shows the totals for each employee. You could pass any parameters you need from the main report to the sub report. You could put the sub report in the Summary section (or possibly a group footer) of your report.
I am trying to Calculate Stock Turn = (COGS for last 12 months from Current date)/Average Inventory Cost for last 12 months).So my 1st step is to Calculate COGS for last 12 months(Cost of Good Sold). I am using the following Query:
SUM( ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].[All
Periods]).Lag(12):ClosingPeriod([Date].[Calendar].[Month],
[Date].[Calendar].[All Periods]), [Measures].[Cogs Amount])
But the Calculated Member is giving me Null results.
Please help.!!
Cheers
Rushir
You are using [ALL Periods]. You should not use that member because it is the root.
The Lag(12) of [All Periods] doesn't exist.
Try using an specific member, something like this:
SUM({ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].[2011].[11]).Lag(12):ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].[2011].[11])}, [Measures].[Cogs Amount])
Or something like this:
SUM({[Date].[Calendar].CurrentMember.Lag(12):[Date].[Calendar].CurrentMember}, [Measures].[Cogs Amount])
Im creating a report using crystal report in vb.net.
The report contained a crosstab which I have 3 data:
1. Dealer - row field
2. Month - column
3. Quantity Sales - summarize field
How can I arrange this by ascending order based on the
Quantity Sales - summarize field?
thanks
Depending on how you're working with it, you can adjust the input to order the data ascending.
SELECT customer, sum(amountdue) AS total FROM invoices
GROUP BY customer
ORDER BY total ASC
If you're doing in a way that you can't change that information, could you provide a little more insight?
Note that other Business Objects products order on the total of a summary field when sorting a cross tab by it's values. I forget how CR does it exactly.