How to get the difference of current year current month total and previous year same month data in ssrs report while using mdx query.. I want to display the result in new column.
check this image :
How to get the difference of current year current month total and previous year same month data in ssrs report while using mdx query.. I want to display the result in new column.
check this image :
If your dataset returns data only from 2015 and 2016 years:
=SUM(
IIF(
MAX(Fields!Year.Value)=Fields!Year.Value,
Fields!Products.Value,
0
)
)
-
SUM(
IIF(
MIN(Fields!Year.Value)=Fields!Year.Value,
Fields!Products.Value,
0
)
)
If your dataset returns data from multiple more than two years you have to explicitely use the years you want to compare.
=SUM(
IIF(
LCase(Fields!Month_Year.Value)=MonthName(Today.Month) & "-2016",
Fields!Sales_Order.Value,
0
)
)
-
SUM(
IIF(
LCase(Fields!Month_Year.Value)=MonthName(Today.Month) & "-2015",
Fields!Sales_Order.Value,
0
)
)
UPDATE: Expression include Month
validation to determine if the row corresponds to the current month, I assume your month field returns the month name i.e "August".
With the description you provided in your question and comments this could help you as start point. Good luck