Analysis :: Getting Correct Order For Date Dropdown MDX

Sep 29, 2015

I have a report that displays its date dropdown badly: 10AM,10PM, 11AM, 11PM etc when it should be 10AM, 11AM, etc. The used measure is Hour Name which looks like "01AM" "02AM" etc. And here is the current query

WITH 
MEMBER [Measures].[ParameterCaption] AS [Report Verified Time].[Hour Name].CURRENTMEMBER.MEMBER_CAPTION 
MEMBER [Measures].[ParameterValue] AS [Report Verified Time].[Hour Name].CURRENTMEMBER.UNIQUENAME
MEMBER [Measures].[ParameterLevel] AS [Report Verified Time].[Hour Name].CURRENTMEMBER.LEVEL.ORDINAL 
SELECT {[Measures].[ParameterCaption],
[Measures].[ParameterValue], 

[Code] ....

View 2 Replies


ADVERTISEMENT

Analysis :: Dimension Errors In Dropdown

Sep 1, 2015

I am getting the dropdown of the dimension folder twice, as i took printshot from client tool. In SSMS/bids also its showing this error. How to resolve it.

View 9 Replies View Related

Report Builder - Filter Dropdown Order Post 2005 SP2 Incorrect

Mar 7, 2007

Hi All,

Hope someone can help here. Since installing Service Pack 2 onto our SQL 2005 instances our report models are not working correctly. When selecting fields within the models as filters, and getting them to prompt when the report is run, the ordering of the data within the filters does not match the selected ordering in the model definition. The ordering is random each time the report is run.

This issue does not happen when setting the filter up, the data appears in the correct order, but when running the report the filter data is incorrect.

I have spent the last 4 hours building a new system and testing this with each stage of service packing. The RTM version of SQL 2005 is ok, SP1 is also OK, but when SP2 is applied the ordering fails.



Any ideas?



Many thanks in advance.



Regards



Nick

View 4 Replies View Related

Analysis :: Order Of Rows In Tabular Table Not In Same Order Data Was Retrieved?

May 19, 2015

I never paid much attention to this before but I noticed this today in a new table I was creating.

For tables defined in the tabular model the table properties have something like SELECT Blah FROM TableName ORDER BY Blah Then in the tabular model the table's data is in the same order it was ordered by in the data source for the table.

I have a date table I setup and I noticed it is NOT respecting the sort order.

I have it sorted by DateID which sorts with the oldest date first and newest date as last row.However, the table that is imported and stored in the data model is not in that order.

I can of course manually sort the rows in BIDS/DataTools, but I find this discrepancy odd.

Would this have negative impacts on the EARLIER function for example if the data rows are not in the order specified?

View 8 Replies View Related

Cursor Issue - Order Not Correct

Apr 18, 2007

I'm using a cursor in SQL Server 2000 to assist me in calculating for each store, the Sales Rank of a zip code. There are about 1500 stores, and 125,000 store/sales/zip code records.

I am finding that this works for about 95% of the stores, but about 5% are getting fouled up, where the store's records are getting split in the sequencing, and so the store ends up with two zips ranked 1, two ranked 2, two ranked 3, etc.

In the DB structure, there is a constraint restricting one record per store (org_id) per zip code (postalcode).

Here's my code. Basically what I'm trying to have the cursor do is go through the table, ordered by org_id (store) asc, org_criteria_value (sales) desc, and rank the zip codes. When a new store is encountered, reset the counter to 1 and start ranking again. Do this until all the records are processed.

/*CREATE Sales_Table table */
CREATE TABLE [dbo].[Sales_Table] (
[count_id] [int] NULL ,
[org_id] [int] NULL ,
[postalcode] [varchar] (20) NULL,
[sales] [numeric](18,6) NULL ,
[sales_rank] [integer] NULL,
[org_criteria_input_date] [datetime] NULL
) ON [PRIMARY]


insert into Sales_Table
select 0 as count_id, omd.org_id, omd.postalcode, omd.org_criteria_value, 0 as cum_rank, org_criteria_input_date
fromorg_model_data omd
join org o on o.org_id = omd.org_id
where o.client_id = @ClientID
and model_Criteria_id = 27
and org_criteria_value <> 0
order by omd.org_id asc, omd.org_criteria_value desc


-- DECLARE CURSOR for Sales_Table

declare SalesRankCursor CURSOR
SCROLL dynamic FOR
select org_id, sales, sales_rank
from Sales_Table
for update of sales_rank


-- CREATE LOOP TO UPDATE SALES RANK in Sales_Table with valid values

OPEN SalesRankCursor

while exists (Select * from Sales_Table where sales_rank = 0)
Begin


FETCH NEXT FROM SalesRankCursor

set @StoreNext = @StoreCurrent
set @SalesRank = (@SalesRank + 1)

update Sales_Table
set@StoreCurrent = org_id
where current of SalesRankCursor

if @StoreCurrent <> @StoreNext
begin
set @SalesRank = 1
end

update Sales_Table
setsales_rank = @SalesRank
where current of SalesRankCursor

End


CLOSE SalesRankCursor

DEALLOCATE SalesRankCursor


Any ideas?

View 5 Replies View Related

Expressions Not Always Evaluated In Correct Order

Aug 15, 2007

Hello!

I have an SSIS package, run by the DTExec utility, each night. When I run my package, I assign a value to a variable (package scope) (/SET "Package.Variables[User:: psRunNo]";0154). (Note: all the variables here are strings).


Value for variable psRunNo = 0154

In the package, I have another package variable called S_SOURCE_FILE_NAME, which is an expression and that uses the variable psRunNo.


Expression for S_SOURCE_FILE_NAME = @[User:: psRunNo] + "_{TABLENAME}.txt"


So, at the beginning, the value of variable S_SOURCE_FILE_NAME is 0154_{TABLENAME}.txt with that example.

Then, I use the variable S_SOURCE_FILE_NAME in the expression used to assign the ConnectionString property of a Connection (a source file), like this:


REPLACE( @[User:: S_REJECTED_ROWS_FILE_NAME] ,"{TABLENAME}", "STADDRES")

So here for example, the final value for ConnectionString would be 0154_STADDRES.txt

Everything works nice, most of the time. Sometimes (intermittent problem), the value of the ConnectionString for one of the many Connections I have in the package is not assigned with the right value of psRunNo. The ConnectionString gets the value of psRunNo which is saved into the package (when it was deployed) instead of the value of psRunNo passed with the DTExec.

It is like if the ConnectionString value was computed before the variable psRunNo (and S_SOURCE_FILE_NAME expression) was assigned to the new value, but only for one of the connections (all my connections use the same kind of expression for their ConnectionString property).

Does somebody had similar precedence problem? Is there some settings I could use to indicate a precedence in assignation of variables ? Where does the "natural" precedence in assignation comes from in SSIS ??

Thanks!

View 5 Replies View Related

Reporting Services Parameters Not In Correct Order

Jan 17, 2007

Hi,

SQL Server Reporting Services 2005.

I have 13 parameters, ordered correctly within the Report Parameter screen.

When displayed in the Preview tab they are all ordered correctly, but when viewed in the application the first 4 are at the top but ordered incorrectly. The remainder are ordered correctly.

I have tried reordering, saving, deploying, viewing and then doing the same but in the correct order without any success.

Please can someone suggest how I can get the parameters to appear in the correct order within the application?

Thanking you,

dwemh

View 6 Replies View Related

Sysdepends And Compiling Stored Procedures In The Correct Order

Nov 9, 2000

Hello:

We are presently testing various upgrade scripts to our current application which is scheduled to shortly be upgraded to mssql 7.0. We are testing under mssql 7.0,sp 2.

As it works now, I receive some existing scripts that have been modified and some stored proceures that are new. For the existing stored procedures, I usually take my best guess as to what the order of creation will be, test it in my script for recompile(actually all are dropped first and then the guesswork on the creates). This is usually trial and error as I run the script, see any sysdepends errors such as:

"CREATE PROCEDURE: ep_invoiceheaderformat_spv0101
Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'ep_assumepay"

And then move the order of the create procedures around in the script and try again until I get a clean run in a test database I use just to syntactically test the scripts.

I looked at the sysdepends table for the database and pretty much decided that the object numbers and stuff was pretty much incomprehensible to me.


Alternatively I could compile each one separately but I would have the same problem subsequently trying to generate a script of the al of the create procedures... in the right order which would not

My question is:

1) Is there a way I can read and understand what the data means in sysdepends?

2) Figure out a way to utilize the data there to create or generate the create stored procedure text in the correct clean compile order?

3) Any other suggestions?

Any information which can be proveded will be greatly appreciated. Thanks.


David Spaisman

View 1 Replies View Related

Report Builder - Filter Drop Down Order Not Always Correct

May 14, 2008

My Problem
=========
I have a problem with a parameter drop down that is on my report. On one report server (i.e. a SQL Server Reporting Server instance), the drop down data is ordered correctly. On another, it appears to be random.

The report is created using Report Builder v9.0.2047.0.

I have used SQL Server Profiler and I have found that an "order by" clause is appended on one of the report servers, while it is excluded on another.

About my Set-up
============
I have configured multiple report servers (i.e. SQL Server Reporting Server instances) on a single SQL Server 2005 instance. The SQL Server 2005 details are:
productversion = 9.00.3054.00
productlevel = SP2
edition = Standard Edition (64-bit)


Another post (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1379591&SiteID=1) puts this problem down to SP2. However, both my report servers are on the same SQL server instance.

I also see that Bob has a blog on a possible solution for this: http://blogs.msdn.com/bobmeyers/archive/2007/10/11/sorting-the-values-in-parameter-dropdowns-in-report-builder.aspx.
However, I would like to understand why the report is behaving differently.

View 2 Replies View Related

Analysis :: Excel 2013 Pivot-table / Grouping On Date That Comes From Analysis Service 2008?

Nov 24, 2015

I am using

SSAS: version 2008
Excel: version 2013

I am connecting to SSAS cube from Excel and I have date dimension with 4 fields (I have others but I don't use it for this case). I created 4 fields in order to test all possible scenarios that I could think of:

DateKey:
    - Type: System.Integer
    - Value: yyyyMMdd
Date:
    - Type: System.DateTime
DateStr0:
    - Type: System.String
    - Value: dd/MM/yyyy (note: I am not using US culture)
    - Example: 01/11/2015  
DateStr1:
    - Type: System.String
    - Value: %d/%M/yyyy (note: I am not using US culture) 
    - Example: 1/11/2015  

Filtering on date is working fine:

Initially, in excel, filtering on date was not working. But after changing dimensional type to time, and setting  DataType to Date, as mentioned in [URL] filter is working fine as you can see in the picture.Grouping on date is not working:

I have hierarchy in my Date dimension and I can group based on hierarchy, no problem. But user is used to pre-build grouping function of excel, and he wants to use that. Pre-build functions of Excel, Group and ungroup seems to be available as you can see in following picture:

But when user clicks 'Group', excel groups it as if it is a string, and that is the problem. User wants to group using pre-build grouping function available in Pivot table. I also find out that Power Pivot Table does not support this excel grouping functionality. And if I understood well, this pre-build grouping functionality of excel, needs to do calculation at run time, and that is not viable solution if you have millions of rows. So Power pivot table does not support pre-build grouping functionality of excel and hence we need to use dimension hierarchy to do the grouping. But I am not using Power Pivot table, I am using simple Pivot Table. So I expect grouping functionality to be working fine. Then I tried to do simple test. I created a simple data source in excel itself. And use it as source of my Pivot table. Then grouping is working fine. The only difference that I can see is (When double click the Measure value in Excel),For date values of my simple test, excel consider them as 'Date'.

For date values of my data coming from cube, excel consider them as 'General'

    2.1. But value here is same as it was in simple test.

    2.2. 'Date Filter' works just fine.

    2.3. If I just select this cell and unselect it, then excel change type to 'Date' though for that cell. 

    2.4. I have created 4 different types of fields in my date dimension thinking that values of attribute of my dimension might be the problem, but excel consider 'General' for all of them.

    2.5 This value (that can be seen when double clicking on measure) comes from 'Name Column' of the attribute. And the DataType defined is WChar. And I thought that might be the reason of issue. And I changed it to 'Date'. But SSAS does not allow it to change to 'Date' giving error : The 'Date' data type is not allowed for the 'NameColumn' property; 'WChar' should be used.

So, I don't know, what is the puzzle piece that I am missing.

1. Date filter works, group does not work

2. Excel consider it as 'General' string.

3. SSAS does not allow to change 'NameColumn' to Date.

View 2 Replies View Related

Find Order By Date Range Or Order Id

May 8, 2007

hi basically what i have is 3 text boxes. one for start date, one for end date and one for order id, i also have this bit of SQL
SelectCommand="SELECT [Order_ID], [Customer_Id], [Date_ordered], [status] FROM [tbl_order]WHERE (([Date_ordered] >= @Date_ordered OR @Date_ordered IS NULL) AND ([Date_ordered] <= @Date_ordered2 OR @Date_ordered2 IS NULL OR (Order_ID=ISNULL(@OrderID_ID,Order_ID) OR @Order_ID IS NULL))">
 but the problem is it does not seem to work! i am not an SQL guru but i cant figure it out, someone help me please!
Thanks
Jez

View 4 Replies View Related

Getting Date In Correct Format

Jan 15, 2006

Hi,
How does one generate a date string from a DateTime object which is formatted in the correct way for the database?
I want to avoid the possibility of getting the month and the day the wrong way around.
Cheers, WT.

View 1 Replies View Related

Pulling Max (date) Not Correct

Dec 21, 2012

Code:
SELECT P.ID, P.QTY, T_DATE
FROM PARTS P
INNER JOIN INVENTORY I ON P.ID = I.PART_ID
WHERE P.QTY > 0 AND I.CODE = 'R'
GROUP BY P.ID, P.QTY, I.T_DATE
HAVING MAX(T_DATE) !> DATEADD(MONTH,-12,GETDATE())

[Code] ....

I am trying to make the sql only pull records where the highest date stored is older than a year ago.

So, based on today's date 12/21/2012:

if the highest (max) T_DATE is 3/12/2012 => don't pull that record
if the highest (max) T_DATE is 11/30/2011 => pull that record into the recordset

the statement is off, it is pulling records that should not be included.

View 4 Replies View Related

Getting The Correct Date Problem?

May 18, 2004

In a procedure that I am writing I have a select statement and need to say give me such and such results from the table where DateEntered is the first of the previous month??

Could somebody help me with that please?

View 4 Replies View Related

Analysis :: Order A Table With MDX Queries

Apr 21, 2015

I have the following MDX query:

SELECT NON EMPTY {[DateT].[Year].[Year].Members } ON ROWS,
NON EMPTY { [Measures].[Val] } ON COLUMNS FROM [MyDB]

I need to order the data by year, so I tried this query:

SELECT
NON EMPTY { Order ( [DateT].[Year].[Year].Members,Desc) }
ON ROWS,
NON EMPTY { [Measures].[Val] } ON COLUMNS
FROM [MyDB]

But it doesn't work.

View 2 Replies View Related

Return Correct Data For A Given Date?

Nov 15, 2012

I have two table one call Employee and the other table call Target Ratio. They are related via FK EmployeeID

tblEmployee
EmployeeID FirstName LastName
1 John Doe

tblTargetRatio
TargetRatioID EmployeeID EffectiveDate Ratio
1 1 1/1/2012 8
2 1 6/1/2012 5
3 1 9/1/2012 7

My question is how can I query tblTargetRatio table to return correct record for the following cases:

1 EmployeeID = 1 and Date = 03/12/2012 (Expecting Ratio = 8)
2 EmployeeID = 1 and Date = 10/10/2012 (Expecting Ratio = 7)
3 EmployeeID = 1 and Date = 08/12/2012 (Expecting Ratio = 5)

View 2 Replies View Related

Analysis :: Measure Group Execution Order

Sep 21, 2015

I am executing a CUBE which is having 9 measure groups, i need to know order of the execution of the measure groups.??

ex:
1. fsales
2.ftranssales
3.fitem
4.fstores..............etc...

I know, the dimension are executed first, but not aware of the order of execution of measure group.

View 4 Replies View Related

Analysis :: Deploying In Order To Update The Cube?

Nov 2, 2015

Scenario: [**tableA**] plus [**tableDim1**] plus [**tableDim2**]. I create a DSW, a cube I deploy the [@@CUBE@@]..so connect the data using an excel file that show the data as [¬¬dashboard¬¬].

It works.

My question is: after three days the [**tableA**] is populated with new rows. In order to allow my colleagues to see the new rows I deploy the [@@CUBE@@] again. My colleagues can see the new rows in the [¬¬dashboard¬¬]. 

It works, ok. But do I really need to deploy the [@@CUBE@@] every time or it should be update automatically when you, for example, refresh the data in Excel. Do I miss something?

View 3 Replies View Related

Analysis :: Tabular Not Possible To Use Order As Per Database In Pivot Table

Aug 25, 2015

We couldn't find a way to show row/column members in the order as in the database. The Pivot table always applies alphabetical sorting: 

Is there really no way to show items as per database order?

View 4 Replies View Related

SQL 2012 :: IsDate In SELECT To Validate / Correct Date

Dec 6, 2014

I am importing data from a legacy system. The date column is a varchar and in the destination DB it is a proper DateTime.

That said I have invalid data and need to clean / accommodate for it as I go. What I need is if the date is valid then insert it, if not then ue a default of '01/01/1900' I am doing the following and it is not working.

CASE
WHEN isDATE(RatifiedDate) = 1 THEN RatifiedDate
WHEN isDate(RatifiedDate) = 0 THEN '01/01/1900'
END as RatDate

<hr noshade size='1' width='250' color='#BBC8E5'>

View 6 Replies View Related

MDX Date Range Report - Didn't Get Correct Result

Aug 5, 2014

I am doing search through Date Range but didn't get correct result.

For Example if i created a Task on 5/8/2014 and when i have take Date Range from 1/8/2014 to 6/8/2014 then didn't get 5/8/2014 data in result but when i taken range from 1/8/2014 to 5/8/2014 then got the 5th Date data.

I am taking Range Inclusive Operator(:).

SELECT ( STRTOMEMBER(@FromDate) : STRTOMEMBER(@ToDate) )

View 1 Replies View Related

Analysis :: Set Attributes In Sort Order For A Dimension In SSAS Cube

Jul 22, 2015

For Example: I have one dimension named as "Name", Under this I have "FirstName" and "LastName" Attributes are there.But when i drag "Name" dimension, By default "First Name" dragged. But i Want "Last Name" should drag.

View 6 Replies View Related

Analysis :: Order Total For Orders Containing A Specific Product Group?

May 27, 2015

I have a request for being able to show ordertotals for those orders that contains a specific productgroup.

Case

Order 1   ProductGroup   Value
A 20
B 40
C 40
Total 100

Order 2   ProductGroup   Value
A 20
D 40
Total 60

So if i slice OrderTotal by ProductGroup the result will be

A 160
B 100
C 100
D 60
ALL            160

how to solve this.

View 9 Replies View Related

Analysis :: How To Set Attributes In Sort Order For A Dimension In SSAS Cube

Jul 22, 2015

I have a dimension like Districts, Under that 2 Attributes are there i.e,District ID and Districts. When i drag Dimension "Districts", in OLAP grid it come District ID first. But i want Districts to drag first. How can we sort Attributes(District ID and Districts) for a dimension.

View 6 Replies View Related

Order By Date

Oct 10, 2007

Hi,

I have this statement:

SELECT DATENAME(month, date) AS Month, COUNT(*) AS Total
FROM Table
GROUP BY DATENAME(month, date)

I want to order it in month order...

If i order it by DATENAME(month, date) then it is just in alphabetical.

Also is there anyway that all months are added to the result even if there are no records for that month (So it will just show 0 in the count)

Thanks for anyhelp

View 7 Replies View Related

Analysis :: Date In Where Clause

Aug 3, 2015

Getting result for this
 
  from [Trans]
  where [Date].[Date].[2015-07-22] 

But when i used like this not getting any result 

With

member measures.A as "2015-07-22"
 from [Trans]
  where [Date].[Date].[measures.A] 

View 3 Replies View Related

Convert Date And Order By

Apr 26, 2007

Hi!I have a little problem. I’m trying to sort a date I have converted like thisConvert(datetime,LH.LoginDateTime,103) as RegistrationDateBut when I use Order by on RegistrationDate it only sort on days:01/11/200601/12/200602/11/200602/12/200603/11/200603/12/2006I’ll guess it’s because of the “varchar� convert, but I need the date to bee inn this format, since I only shall check the date and not the time. Is there a way around this, so I can order it like this? (Se under)01/11/200602/11/200603/11/200601/12/200602/12/200603/12/2006Sample SQL;select Convert(varchar,LH.LoginDateTime,103) as RegistrationDate,select count(*) from LoginHistory AS LH2 where datepart(hh,LH2.LoginDateTime)<7 ANDConvert(varchar,LH2.LoginDateTime,103)>=Convert(varchar,LH.LoginDateTime,103) AND Convert(varchar,LH2.LoginDateTime,103)<=Convert(varchar,LH.LoginDateTime,103)) As beforehour07from LoginHistory AS LHwhere LH.LoginDateTime >='''+ Convert(varchar,@FromDate,113) + ''' ' + 'and LH.LoginDateTime <='''+ Convert(varchar,@ToDate,113) + ''' ' + 'group by Convert(varchar,LH.LoginDateTime,103)'Order by RegistrationDate

View 4 Replies View Related

Order By Date, So The Oldest Is First..

Feb 3, 2008

Hello there,I have a problem when I'm trying to order by the date..I have tried this string:SelectCommand="SELECT TOP 5 [Date], [Id], [Navn], [ShortInfo] FROM [fest] ORDER BY [Date] DESC">
And I have these dates:



04/02/2008

06/02/2008

20/02/2008

29/02/2008

08/03/2008

28/03/2008They should be shown like this:



04/02/2008

06/02/2008

20/02/2008

29/02/2008


08/03/2008
But they dosn't, insted is they shown like this:


29/02/200828/03/200820/02/200808/03/200806/02/2008How can I do, so it work?Regards Jeppe Richardt

View 8 Replies View Related

Order By Descending Date

Feb 1, 2007

Here is my sp. I want it to order by descending date, but now it is 1st Feb it is putting this at the bottom, though January is still sorted fine. I need the dates to display in UK format dd/mm/yy

CREATE Procedure [dbo].[spRMU_CountNoDailyUsers]

AS
SELECT CONVERT(varchar, Log_DateTime, 103) AS Date_Logged_In, Log_Username as Username, COUNT(Log_Username) AS No_Logins
FROM tblUserLog
Where Log_Printed =0
GROUP BY CONVERT(varchar, Log_DateTime, 103) , Log_Username
ORDER BY CONVERT(varchar, Log_DateTime, 103) desc, No_Logins desc
GO

View 2 Replies View Related

ORDER BY Earliest Date In A Row

Jul 20, 2005

Hi,I have a table (SQL Server 2000) with several date columns in it, all ofwhich are individually NULLable, but in any one row, not all the dates canbe NULL.I want a query which ORDERs BY the earliest date it finds in each row. I'mguessing I have to do this in two steps:STEP 1Using a UDF, find the earliest date and stick it in a new calculatedcolumn "earliest date"STEP 2ORDER BY this UDF-created columnIf this is the right way to go about this, is there a simple SQL way ofdetermining which is the lowest of several dates? (ie of doing STEP 1).Or am I looking at this the wrong way, and missing an easy *one-step* way ofgetting what I want?TIA,JON

View 5 Replies View Related

Ordering Date In Asc Order ?

Oct 12, 2006

SELECT
LEFT(CONVERT(CHAR(11),convert(datetime,task_date),109),3) + ' ' +
RIGHT(CONVERT(CHAR(11),convert(datetime,task_date),109),4) as Date,
SUM(CASE a.status_id WHEN 1000 THEN b.act_point ELSE 0 END) as Programming,
SUM(CASE a.status_id WHEN 1016 THEN b.act_point ELSE 0 END) as Design,
SUM(CASE a.status_id WHEN 1752 THEN b.act_point ELSE 0 END) as Upload,
SUM(CASE a.status_id WHEN 1032 THEN b.act_point ELSE 0 END) as Testing,
SUM(CASE a.status_id WHEN 1128 THEN b.act_point ELSE 0 END) as Meeting,
SUM(CASE a.status_id WHEN 1172 THEN b.act_point ELSE 0 END) as Others
From
task_table a,act_table b where a.status_id=b.act_id and
a.user_id=(select user_id from user_table where user_name='Raghu') and
a.task_date like '%/%/2006'
GROUP BY
LEFT(CONVERT(CHAR(11),convert(datetime,task_date),109),3) + ' ' + RIGHT(CONVERT(CHAR(11),convert(datetime,task_date),109),4)

Output :

Aug 2006 294 0 0 80 0 0
Jan 2006 14 0 0 0 0 0
Oct 2006 336 0 0 0 0 0
Sep 2006 3262 20 24 8 16 0

How to sort the date in ascending Order ?

Jan 2006
Aug 2006
Sep 2006
Oct 2006

View 5 Replies View Related

Analysis :: Get Value Based On Max Of Date Dimension

Nov 18, 2015

I have a measure group product price, the measures are

1. Product Id
2. Price
3. Date

I have mapped the product id and date with product and date dimensions.I need to get the latest price of the product.For example:

Prod1, 100, 1/1/2015
Prod1, 300, 2/1/2015
Prod1, 250, 3/1/2015
Prod1, 150, 10/1/2015

So, i need the latest price. The latest price is 150.I new to MDX query. MDX query to achieve this?

View 3 Replies View Related

Analysis :: MDX For And Operator In 2 Date Dimension

Jun 4, 2015

I am in a situation to slice a fact in two date dimension .. my <g class="gr_ gr_73 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="73" id="73">sql</g> code is like this 

select count(1) from fact_table  where end_date >=(selecteddate on filter) and startdate <=end_date .

The common date dimension is Start date. and the filter will be only on <g class="gr_ gr_168 gr-alert gr_gramm Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="168" id="168">end</g> date.

Below is the code so far

<g class="gr_ gr_228 gr-alert gr_tiny gr_spell ContextualSpelling multiReplace" data-gr-id="228" id="228">i</g> did, but <g class="gr_ gr_229 gr-alert gr_tiny gr_spell ContextualSpelling
multiReplace" data-gr-id="229" id="229">i</g> am not finding how to filter the start date <=end_date

   with member  [Measures].[X] as 

 Sum(
{[EndDate].[YQMWD].currentmember:NULL}, 
([Measures].[Count])) 
 select [Measures].[X]  on 0 ,
 [EndDate].[YQMWD].year.members on 1
  from Cube

What is the trick I can put so that I can filter those data where start date <=selected end date ....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved