SSRS report using mdx query to display sales of product by yearwise
There is a requirement to create SSRS report as
Product +Calender2011 -Calender 2012 +Calender 2013
+ Calender 2014
Jan12 Feb12 Mar12...
Product 1 50 100 200 ..
Product 2 150 900 200 ..
Product 3 250 180 900 ..
Product 4 450 100 200 ..
Product 5 50 100 200 ..
Product 6 50 100 200 ..
When I click on Calender2011 corresponding all months of 2011 has to appear and likewise for Calender2012, CalenderN
The MDX query I have like as follows-
Select Non Empty{
[Measures].[Product1],
[Measures].[Product2],
[Measures].[Product3],
[Measures].[Product4],
[Measures].[Product5],
[Measures].[Product6],
[Measures].[Product7],
[Measures].[Product8],
[Measures].[Product9],
[Measures].[Product10],
[Measures].[Product11],
} ON Rows ,
Non Empty { ([Dim Calendar H].[Year Name].[Year Name] ) *([Dim Calendar H].[Month name].[Month name])
ON COLUMNS
FROM ( SELECT ( { [Dim Calendar H].[Year Name].&[Calendar 2014],
[Dim Calendar H].[Year Name].&[Calendar 2013],
[Dim Calendar H].[Year Name].&[Calendar 2012],
[Dim Calendar H].[Year Name].&[Calendar 2011] } )
ON COLUMNS
FROM [Cube])
Please help me.
Advance thanks...
Hi Afans,
According to your description, you want to create a drill-down report using SQL Server Analysis Services database, right?
In this case, you need add the Year and Month fields to the column group, and set the Month column can be toogled by Year column group. I have teste it on my local environment, here is the sample query for your reference.
select [Measures].[Internet Sales Amount] on 0,
[Product].[Category].members*[Date].[Calendar].[Calendar Year].members*[Date].[Month of Year].members on 1
from
[Adventure Works]
Reference
http://popbi.wordpress.com/2012/03/02/ssrs-how-to-add-a-column-group-to-an-existing-table/
http://msdn.microsoft.com/en-IN/library/dd207042.aspx
Regards,
Charlie Liao
TechNet Community Support
Similar Messages
-
How to create SSRS repot using MDX
Hello,
Can any body let me know how to create SSRS reports using MDX queryHi Sanjay_S,
Take a look into
Build SSRS Report using MDX
Aftab Ansari -
Except function with parent child hierarchy using mdx query
HI,
I need to remove some items using mdx query in parent child hierarchy.
I tried with below query,it is not removeing ,could you please help me.
SELECT
{[Measures].[Amount]} ON
COLUMNS
NonEmpty([Account].[Accounts].[Account Level 01],[Measures].[Amount])
ON ROWS
FROM (SELECT
-Descendants({[Account].[Accounts].&[47]},,Leaves)
} ON COLUMNS
FROM [Adventure Works])
induHi Indu,
Why do you remove some itmes using
Descendants function? Generally, we use FILTER function to achieve the requirement.
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name<>'Net Income')
SELECT {[Measures].[Internet Sales Amount]} ON 0
[CustomAccounts] ON 1
FROM [Adventure Works]
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name='Net Income')
SET [RemainingAccount] AS
[Account].[Accounts].[Account Level 01]- [CustomAccounts]
SELECT {[Measures].[Reseller Sales Amount]} ON 0
[RemainingAccount] ON 1
FROM [Adventure Works]
Results.
References.
http://www.databasejournal.com/features/mssql/article.php/3306101/MDX-Essentials-Basic-Set-Functions-The-Filter-Function.htm
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0149678-97f2-4066-903f-7f9e9ff09b56/filtering-out-dimension-members-with-mdx?forum=sqlanalysisservices
Regards,
Charlie Liao
If you have any feedback on our support,
please click here.
Charlie Liao
TechNet Community Support -
IIf condition between dates using mdx query
Hi,
how to check IIF condition between dates using mdx query.
I able to check single year,plese check below mdx query.I need to check members between years.
my requirement is member is belongs to between years(2007 to 2010),display "yes" else "NO";
Could you please give me exact mdx query.
From,to-2007,2010,if member belongs to 2007to 2010 then disply "yes"else "no".
how to pass two members in IIf condition.
WITH
MEMBER Measures.[test]
AS Iif([Date].[Calendar Year].currentmember
is [Date].[Calendar Year].&[2007],"no","yes")
SELECT {Measures.[test]}
on 0
,[Product].[Subcategory].[Subcategory].MEMBERS * [Date].[Calendar Year].[Calendar Year]
ON 1
FROM [Adventure Works]
induHi Sriindu,
consider the following:
WITH
MEMBER measures.[test] AS
IIF
Exists
[Date].[Calendar Year].CurrentMember
[Date].[Calendar Year].&[2007] : [Date].[Calendar Year].&[20010]
).Item(0)
IS
[Date].[Calendar Year].CurrentMember
,"yes"
,"no"
SELECT
{measures.[test]} ON 0
[Product].[Subcategory].[Subcategory].MEMBERS
[Date].[Calendar Year].[Calendar Year] ON 1
FROM [Adventure Works];
Philip, -
How to design SSRS report using SharePoint 2010 List Version History
Hello,
I am using Sharepoint 2010 list, i need to design SSRS report using Sharepoint List Version History. Could please let me know how to design.
Thank you.
Kind RegardsYou could do that with SQL Server Reporting Services, Please follow the instructions from the link below:
http://www.mssqltips.com/sqlservertip/2068/using-a-sharepoint-list-as-a-data-source-in-sql-server-reporting-services-2008-r2/
Hope that would work fro you.
Please Mark as Answer, if the post works for you.
Cheers,
Amar Deep Singh -
Generating a report using ABAP query
Hi All,
I want to generate a anlytical report using ABAP query, There are 3 different transactions/steps have to be executed to get this data in an actionable form.
1. MB52 - Unrestricted Stock
2. ZCustomquery - Custom query in SAP R3
3. Combine above two in a single report.
Please suggest me how can i proceed,
1. Example i have created query name called Finalrepot
2. How can i call above zcustomquery and Transaction (MB52) in the Query.
Thanks for your help
PradeepHi,
Check below link to create ABAP query (SAP Query)
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
Best regards,
Brijesh -
Hi,
I am using WebI Report using BW Query. I don't see some Formulas in Universe which is there in BEx Query.
Did anybody face the same problem before?Hi,
I meant that you should post in the forum the calculation contained in the formula that you cannot see in your universe.
But let's start from the begining since you are new to SAP: Did you generated the universe yourself? If the formula was added in the query after the universe was created then you must refresh your universe (In the Universe designer please select the option "Refresh structure" under the "view" menu) in order to get the newly created formula (I assume we are takling about a calculate figure here) in your universe also.
Regards,
Stratos -
SSRS report using Access database in SharePoint.
Dear All,
I have created SSRS report using Access database. I have successfully deploy SSRS report in SharePoint document library.
When I am opening the same report I am getting following error.
Can anyone please help me how to resolve this issue ?
Error:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'WOW'. (rsErrorOpeningConnection)
ERROR
[IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an
architecture mismatch between the Driver and Application
Thanks,
Harish PThis seems odbc driver issue ,Plz check the follwoing links for the solution
http://social.technet.microsoft.com/Forums/sqlserver/en-US/a4ddb239-64d8-4074-978c-45c30381c107/ssrs-2012-error-im014-microsoftodbc-driver-manager-the-specified-dsn-contains-an-architecture?forum=sqlreportingservices
http://social.msdn.microsoft.com/Forums/en-US/a4ddb239-64d8-4074-978c-45c30381c107/ssrs-2012-error-im014-microsoftodbc-driver-manager-the-specified-dsn-contains-an-architecture?forum=sqlreportingservices
Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem -
Using mdx query from Java Apache
Please suggest/guide me how to use MDX query to pull data from cube from Apache JAVA??
BI GUYHi BIGUY,
Multidimensional Expressions (MDX) is the query language that you use to work with and retrieve multidimensional data in Microsoft Analysis Services. MDX is based on the XML for Analysis (XMLA) specification, with specific extensions for SQL Server Analysis
Services.
According to your description, it's hard to give your the exact MDX query to pull the data which you want from the cube since there are no any detail information about the cube. Here are some basic knowledge for your reference.
Querying Multidimensional Data with MDX
MDX Sample
Regards,
Charlie Liao
TechNet Community Support -
Development of Reports using ABAP Query
Hi
can anyone please tell me about 'Development of Reports using ABAP Query' and how to use it in real time
Thanks
jaylook here:
http://help.sap.com/saphelp_47x200/helpdata/en/b7/26ddebb1f311d295f40000e82de14a/frameset.htm
A. -
Created Webi report using BEx Query.
Hi All,
I am going to upgrade in BW and using BEx & Webi Report. I have created webi report using BEx query. Now I need to test data in webi report.
Can anyone tell me how to test data?
Regards,Hi,
compare the webi report data with Bex report. more you can compare webi report with SAP R3 system for random records.
Thanks,
Amit -
Executing Crystal Report using BI Query as datasource in Bobj portal
I have a Crystal report using BI query as the datasource. The BI query contains User Entry variables.
The Crystal report executes as expected except when added to the Bobj portal. From the portal, I can schedule the report and it will execute as correctly. However, if I try to execute without scheduling, I am able to enter the BI restrictions, but then am presented the following error message: "An error has occurred: For input string: "" ".
If I remove all the BI variables from the query, the report will execute from the portal with out scheduling.
Any help would be greatly appreciated.Hi,
You can set your parameters from CMC. Select the report and set parameters in to the report properties.
-SG -
I need to write a MDX query to show the latest product text again historical facts or a chosen product text in time. I can write this query in TSQL, but new to MDX.
The way I do it in TSQL is joining two queries together on the Natural Key as opposed to the surrogate key.
Can this be done in MDX. I know I could write two separate MDX queries, one which get the product text I wan and the other to get the measure with the actual product text and Natural Key, and use a lookup function in ssrs to show the two result sets I the
same tablix by looking up the Natural Keys. But this should be able to be done in one query shouldn't it.
In the dsv the fact knows to join to the dimension using the surrogate key.
Thanks JHi Jamster,
According to your description, you want to write a query to show the latest product text, right?
In MDX, we can use LastNonEmpty function to return the lastest member winth a dimension. LastNonEmpty is an aggregation function available in the Enterprise version of SQL Server. However, you can create your own with a little bit of recursive MDX. Here
is a sample query for you reference.
With Member Measures.LastHits as
iif(isempty(Measures.Hits),
([Date].[Year Month Day].prevmember,
Measures.LastHits
),Measures.Hits)
Reference
http://cwebbbi.wordpress.com/2011/03/24/last-ever-non-empty-a-new-fast-mdx-approach/
http://richardlees.blogspot.com/2010/07/getting-last-non-empty-value.html
If this is not what you want, please provide us the detail structure of your cube and the expected result, so that we can make further analysis and give you the exactly MDX query.
Regards,
Charlie Liao
TechNet Community Support -
Create SSRS report using DMV for querying SSAS cube.
I am trying to create a SSRS Report to find the Cube/Dimension Status (when was Cube/Dimension last processed and is Failed/Success), for example I have below DMV query for the same.
SELECT CUBE_NAME, LAST_DATA_UPDATE FROM $System.MDSCHEMA_CUBES
When i execute the above query in MDX query window it comes up with results, when i try to create a data using the above query in report server its coming up with error.
Error : Please verify that the query is an MDX one and not DMX. (Microsoft.AnalysisServices.Controls)
Can we use DMV querys for createing SSRS report and what should be the datasource.
Thank You.
PraveenHi Praveen,
Glad to hear that the issue had been solved. Thank you for sharing the useful information.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Date parameters using MDX query
Hello experts,
Not sure if this question falls under SSAS or SSRS but I'm writing it here for now and hopefully get the answer.
I'm using SSAS cube to develop a report using SSRS and this is the first time I'm doing it. I want to filter records based on date range and did some research online. My report contains two datasets:
1. dsMain dataset -> it contains all the field which I want to use in the report and added a parameter thru query designed with following settings:
Dimension : Dates
Hierachary : Date
Operator : Range (Inclusive)
Parameters : checked
it created two parameters called FromDatesDate and toDatesDate
2. I created another dataset called dsDate and wrote a custom query (found at following link) and changed FromDatesDate and ToDatesDate using this date dataset
https://jsimonbi.wordpress.com/2011/03/22/using-a-date-parameter-in-ssrs-with-mdx/
Query for dsDate
WITH
MEMBER DateValue
AS
[Dates].[Date].CurrentMember.UniqueName
MEMBER DateLabel
AS
[Dates].[Date].CurrentMember.Name
SELECT
[Measures].[DateValue],
[Measures].[DateLabel]
} ON 0,
[Dates].[Date].[Date]
} ON 1
FROM [myCube]
Here is the value returned by dsDate dataset (above query)
DateValue DateLabel
06/04/1980 [Dates].[Date].&[29375]
06/04/1980
06/05/1980 [Dates].[Date].&[29376]
06/05/1980
06/06/1980 [Dates].[Date].&[29377]
06/06/1980
06/07/1980 [Dates].[Date].&[29378]
06/07/1980
06/08/1980 [Dates].[Date].&[29379]
06/08/1980
06/09/1980 [Dates].[Date].&[29380]
06/09/1980
06/10/1980 [Dates].[Date].&[29381]
06/10/1980
06/11/1980 [Dates].[Date].&[29382]
06/11/1980
06/12/1980 [Dates].[Date].&[29383]
06/12/1980
06/13/1980 [Dates].[Date].&[29384]
06/13/1980
Here is what I changed in FromDatesDate and ToDatesDate parmeter:
Under Available Values tab:
Dataset : dsDate
Value Field : DateValue
Label Field : DateLabel
Here are my questions:
1. I want to use date/time parameter so that user doesn't have to scroll thru whole date dimension.
2. I changed the FromDatesDate and ToDatesDate to date/time parameter, removed the values from Available values tab and made the following changes on Parmaeters expression under dsMain dataset
=”[Dates].[Date].&[” + Format(CDate(Parameters!FromDatesDate.Value),”MM/dd/yyyy”)
+ “T00:00:00]”
=”[Dates].[Date].&[” + Format(CDate(Parameters!ToDatesDate.Value),”MM/dd/yyyy”)
+ “T00:00:00]”
Now when I run the report I get following error:
Query (1, 55) The restrictions imposed by the CONSTRAINED flag in the STRTOMEMBER function are violated.
I think the reason is by changing parameter to date/time, now I cannot get "DateValue" which is required for the query.
1. What is the best way to work with date parameters?
Hope it is all clear and look forward to hear from experts.
Thanks,
P
mark it as answer if it answered your question :)Hi Parry2k,
In Analysis Services, a member can be referenced by either its member name or by its member key. The member key is used by the dimension to specifically identify a given member. The ampersand (&) character is used in MDX to differentiate
a member key from a member name. In this scenario, the datetime is member name, not the member key. So you should not add "&".
Reference:
Member Names and Keys
Simon Hou
TechNet Community Support
Maybe you are looking for
-
my ipad mini is stuck in dfu mode trying to restore it with ios 7.0.2 it completes the bar(restoring ipad software) then it gives me the ipad could not be restores. an unknown error occured(14)
-
hi, i have created a directory as fllows create or replace directory ext_dir as 'd:\oracle\ora92'. after that i created a csv file called test.csv in the same directory. When i am trying to create an external table i am getting the following errors.
-
Positive Value only Display or Edit Pattern
Hello, could someone please explain how I can prevent a negative result in a calculation field? i.e., a result less than zero. In other words, how can I ensure that users only enter positive values in a numeric field, and that the subsequent simple "
-
Hi i`m delli, fresher in OBIEE, can you please post the step for enable proxy functionality in OBIEE 11.1.1.5. it's urgent, i`m struggling more than two weeks. Thank You in Advance
-
I have one computer with a camera, and another without. Is it possible for one computer to see video, and other just to have audio? Also, sometimes I can do an audio chat and other times it gives me an error. Can anyone please shed some light on this