SSRS how to show pre-calculated totals - reporting-services

I have a data like
which comes from SSAS. Amount_YTD and Amount_YTE values are as Measures.
YTDs are Year-To-Date values, and YTEs are Year-To-End values regardless of Month filter.
My report design is
So, with this design, YTD and YTE values are SUMed (naturally) and what I get is
So row and column totals and grand totals are not as expected. This is what I would like to achieve,
(some rounding may occur)
How can I get "Expected" report?

For ALI you need to use MAX instead of sum for YTD and MIN instead of sum for YTE looking at your data.
For your other two summary lines toplam and Genel Toplam I would alter your ssas query so that it gives YTD and YTE figures regardless of both customer and month and use these figures in the YTD and YTE columns

Related

Adding Filter Columns In Query When Calculation Year Over Year Growth in Apache Superset SQL LAB

I have been trying to calculate year over year growth for Cost.
Without Lag() I need to do it in MYSQL (SQL LAB in Apache Superset), then I'm going to create a widget using that query.
I could do the calculation and the answers are correct. But I could group the calculated YOY metric only based on YEAR column.
But I need other 3 dimension columns for FILTER. If I use those dimensions in query and If I add those columns in GROUP_BY statement, My output is wrong.
This is the output I got from the query which I have created:
If you notice the This year and Last year company column, its not correct when compared with Years. So, If I use that column in query, Its not giving correct output. Its not correctly grouping by the Company.
Any suggestions to calculate Year Over Year Growth metric with other dimension columns I need for Filters ?
NOTE: Without LAG()
I have used SQL Query - Year by Year Growth of Sales as the ref. I did use the same method to calculate YOY.

Count the number of columns in a column group

I need to report the average number of customer visits each engineer makes per month.
My SQL query creates a temporary table of months between the start date and end date and left joins this to the main data table, to ensure rows are returned even for months where no visits were made.
So an example of the data returned from SQL may be:
My report has two column groups, one for year and one for month, and I have a row group for the engineer.
For this report, the date is always returned as the first of the month, even though the actual visit could be on any date.
At the end of each year there is a cell which contains Count(Customer) and totals the number of visits the engineer made in that year. I would also like to have a cell which displays the average number of visits made each month in that year.
For a complete year I could simply divide by 12. However for a partial year I need to count the number of month columns for that year.
I tried CountDistinct(Month) but this only counts months where at least one visit was made, making the monthly average incorrect.
How can I get a count of the number of columns in a column group, including columns with no data?
Thanks.
The way I would do this would be to add a column into your temporary dates table that had the number of months selected in it.
You could do this by either counting the months in the temp table then appending the value to it or, if the dates table contains more than just months then work it out based on the parameters you pass in.
For example
SELECT *, DATEFIFF("m", #startDate, #endDate) as NoOfMonths
INTO #myTempDateTable
FROM myDateTable
WHERE etc...
Then in SSRS you can simply divide your total by this number.

MS Access summing empty columns

I have created a CrossTab query that has financial quarters as columns, e.g. Q1, Q2, Q3, Q4. I added the columns to the property sheet of the query so they would always show and to prevent errors on the subsequent report.
When I run the report I total each of the columns at the bottom and then a grand total for all four columns. A column with nothing in it shows a blank total and causes the grand total to also be blank. How can I amend my grand total formula (=TQ1+TQ2+TQ3+TQ4) to exclude any empty column totals?
You can use Nz:
=Nz(TQ1,0)+Nz(TQ2,0)+Nz(TQ3,0)+Nz(TQ4,0)

SSRS Line Chart X-Axis group by Month

everyone. For the life of me I cannot figure out why the X-Axis is pulling 2 dates in each month when I want it to group by each month. In the Values I have:
Value Field =RunningValue(Fields!new_actualsalesfromsplit.Value, Sum, "Chart1_SeriesGroup")
Category Field: =Fields!closedate.Value
Category Groups =Month(Fields!closedate.Value)
Group On =Month(Fields!closedate.Value)
Series Group by ["salesperson']
The chart should have a line for each sales person, and each month should be a cumulative representation of the sales by that person. Thanks for any help.
Set the category field to "=Month(Fields!closedate.Value)", or something similar that will net the results you need. Right now, even though you're grouping by month, you're still telling SSRS to use the atomic data for your X axis, so that's what it's doing.
It may make your task simpler to just add a Calculated Field to your dataset - open the dataset properties window, go to the fields tab, and click "add". Set that field to your month value, use it for grouping and your X axis.

Which table hold the tax for sales order?

I create SSRS report that read data from Sales order in AX 2012.
In my SSRS report I want to calculate Total Amount and VAT for the Sales Order but i can't find where can get the tax for sales order.
There is no simple answer for this, but you should not use the tables your self, but use the class SalesTotals to calculate.
You may also consider looking at class SalesConfirmDP to see how in does its job.