SSAS Tabular - rows in model that are NOT in source -due to building of "cube"?
I have a source SQL table that is basically a SELECT * FROM SQLSOURCETABLE for a table in a TABULAR model.
When that table processes, it appears to not only return just the rows in the table, but to build a cube and store results for rows that do not exist.
That is to say:
SalesAmount
SalesCategory
SalesYear
The table has rows for SalesCategory="Bikes" and SalesYear=2012.
However the source SQL table has no Bike sales in the year 2013. So instead of the tabular model having no rows for 2013 it instead has SalesCategory: Bikes, SalesYear:2013 and SalesAmount = 0
Querying the SQL source table with:
SELECT SalesAmount,SalesCategory,SalesYear
FROM SQLSOURCETABLE
WHERE SalesCategory='Bikes' AND SalesYear=2013
would return zero rows. However, in the tabular model after processing it does return rows, with SalesAmount=0.
I assume this is standard behavior for Tabular models (since they are part of SSAS and well... just building their cube?)
I guess I just never thought of it building out data for intersections that did NOT exist, only for intersections of data that DID exist?
*EDITED: Fixed typo I had 2014 instead of 2013 for year
Hi ,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Charlie Liao
TechNet Community Support
Similar Messages
-
Select multiple row in a table that are not connected
I want to be able to select multiple rows, but want to be able to select rows that are not next to each other. They maybe have one or two rows between. Is there anyway to do this in a table?
ThanksSo do a lot of other people, but you can’t.
Tell Adobe here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Bob -
Delete Rows from T1 which are Not in T2
Hi
I've 2 Tables like below
T1
N1
N2
2
11
2
22
3
33
8
44
8
88
T2
N1
N2
2
22
8
88
If I Run Delete query, I must delete Rows from T1 which are Not in T2
For example, I must delete Rows 1,3,4 from T1
So how to write that delete query? Please adviceDelete from T1
Where not Exists (select * from T2 Where t1.N1=t2.N1 and t1.N2=t2.N2)
--or
Delete t
From t1 t
left JOIN t2 m
ON m.N1=t.N1 and m.N2=t.N2
WHERE m.N1 is null and m.N2 is null
--Or
;With mycte as
select N1,N2 from T1
Except
select N1,N2 from T2
Delete t
From t1 t
INNER JOIN mycte m
ON m.N1=t.N1 and m.N2=t.N2 -
How do I include those empployee numbers that are not 8 digits?
Hello all again.
My script currently doesn't find those employee numbers that are NOT 8 digits (some emp nos are 6, 7, 9) when doing comparisons. I've tried LPAD but it still doesn't find. Can anybody suggest a reason for this? I can post my whole script if you want but basically it doesn't match record in my temp table (SU_TEMPLOYEE_DETAILS):
SELECT std_hire_date, std_last_name, std_sex, std_date_of_birth,
std_email_address, std_emp_status,
LPAD (std_employee_number, 8, '0') std_employee_number,
-- std_employee_number,
std_first_name, std_marital_status, std_middle_names,
std_nationality, std_title, std_national_identifier,
std_address_line1, std_address_line2, std_address_line3,
std_address_line4, std_post_code, std_telephone_1, std_country,
std_location_id, LPAD (std_supervisor_number, 8, '0') std_supervisor_number
FROM SU_TEMPLOYEE_DETAILS
WHERE std_employee_number = :p_emp_number..with the existing record in Production instance:
SELECT DISTINCT per.person_id, per.business_group_id, per.last_name,
per.start_date, per.date_of_birth, per.email_address,
--LPAD (per.employee_number, 8, '0') employee_number,
per.employee_number,
per.first_name,
per.marital_status, per.middle_names, per.nationality,
per.national_identifier, per.sex, per.title,
padd.address_id, padd.primary_flag, padd.address_line1,
padd.address_line2, padd.address_line3,
padd.town_or_city, padd.postal_code,
padd.telephone_number_1, paas.assignment_id,
paas.assignment_number, paas.object_version_number,
paas.effective_start_date, paas.effective_end_date,
paas.job_id, paas.position_id, paas.location_id,
paas.organization_id, paas.assignment_type,
paas.supervisor_id, paas.default_code_comb_id,
paas.set_of_books_id, paas.period_of_service_id
FROM per_all_people_f per,
per_all_assignments_f paas,
per_addresses padd
WHERE padd.person_id(+) = per.person_id
AND paas.person_id(+) = per.person_id
AND per.employee_number LIKE 'C%'-- :p_emp_number
AND per.national_identifier = :p_ni_number
AND REGEXP_LIKE(per.employee_number, '[[:alpha:]]');The Employee Number is 7 digits long (0000016). But I need the script to match its record where it may be 000016 or 00000016 in Production. Is this possible?
Many thanks for looking..
StevenJackyWhite wrote:
My script currently doesn't find those employee numbers that are NOT 8 digits (some emp nos are 6, 7, 9) when doing comparisons. I've tried LPAD but it still doesn't find. Can anybody suggest a reason for this? I can post my whole script if you want but basically it doesn't match record in my temp table (SU_TEMPLOYEE_DETAILS):
The Employee Number is 7 digits long (0000016). But I need the script to match its record where it may be 000016 or 00000016 in Production. Is this possible? I would like to use the TRIM Function here rather than a simple LPAD (with hard coded length) especially if the length of the column std_employee number varies based on the leading zeroes. Something like:
SQL> WITH test_tab AS
2 (SELECT '000016' col
3 FROM DUAL
4 UNION ALL
5 SELECT '10000016'
6 FROM DUAL
7 UNION ALL
8 SELECT '00000016'
9 FROM DUAL)
10 -- "end of test data "
11 SELECT col, TRIM (LEADING '0' FROM col) changed_col_2
12 FROM test_tab
13 /
COL CHANGED_
000016 16
10000016 10000016
00000016 16
3 rows selected.
SQL> variable param VARCHAR2(30);
SQL> exec :param := '00016';
PL/SQL procedure successfully completed.
SQL> WITH test_tab AS
2 (SELECT '000016' col
3 FROM DUAL
4 UNION ALL
5 SELECT '10000016'
6 FROM DUAL
7 UNION ALL
8 SELECT '00000016'
9 FROM DUAL)
10 -- "end of test data "
11 SELECT col, TRIM (LEADING '0' FROM col) changed_col_2
12 FROM test_tab
13 WHERE TRIM (LEADING '0' FROM col) = TRIM (LEADING '0' FROM :param)
14 /
COL CHANGED_
000016 16
00000016 16
2 rows selected.
SQL> exec :param := '016';
PL/SQL procedure successfully completed.
SQL> WITH test_tab AS
2 (SELECT '000016' col
3 FROM DUAL
4 UNION ALL
5 SELECT '10000016'
6 FROM DUAL
7 UNION ALL
8 SELECT '00000016'
9 FROM DUAL)
10 -- "end of test data "
11 SELECT col, TRIM (LEADING '0' FROM col) changed_col_2
12 FROM test_tab
13 WHERE TRIM (LEADING '0' FROM col) = TRIM (LEADING '0' FROM :param)
14 /
COL CHANGED_
000016 16
00000016 16
2 rows selected.
SQL> So your where clause will become something like:
WHERE TRIM (LEADING '0' FROM std_employee_number) =
TRIM (LEADING '0' FROM :p_emp_number)Hope this helps.
Regards,
Jo -
Determining indexes that are not used in 10g
Is there a way to identify indexes that are not utilized in 10g? We have ADDM and AWR running nightly.
Thanks in advance...You can enable index monitoring with
alter index <index_name> monitoring usage;
When the index is used V$OBJECT_USAGE.USED column will be set to YES. If the index is not used the USED column will show NO.
test@ORCL> alter index i_test monitoring usage;
Index altered.
Elapsed: 00:00:00.04
test@ORCL> select * from v$object_usage;
INDEX_NAME TABLE_NAME MON USE START_MONITORING END_MONITORING
I_TEST TEST YES NO 01/04/2007 07:52:21
Elapsed: 00:00:00.04
test@ORCL> explain plan for
2 select object_id from test;
Explained.
Elapsed: 00:00:00.10
test@ORCL> select * from v$object_usage;
INDEX_NAME TABLE_NAME MON USE START_MONITORING END_MONITORING
I_TEST TEST YES NO 01/04/2007 07:52:21
Elapsed: 00:00:00.00
test@ORCL> select count(*) from test;
COUNT(*)
50425
Elapsed: 00:00:00.00
test@ORCL> select * from v$object_usage;
INDEX_NAME TABLE_NAME MON USE START_MONITORING END_MONITORING
I_TEST TEST YES NO 01/04/2007 07:52:21
Elapsed: 00:00:00.00
test@ORCL> select * from test where object_id =1;
no rows selected
Elapsed: 00:00:00.07
test@ORCL> select * from v$object_usage;
INDEX_NAME TABLE_NAME MON USE START_MONITORING END_MONITORING
I_TEST TEST YES YES 01/04/2007 07:52:21
Elapsed: 00:00:00.00
test@ORCL>You turn of index monitoring with the following:
alter index <index_name> nomonitoring usage; -
Best way to obtain records that are NOT in another table
I have two rather large tables in oracle. An Account table that has millions of rows. Each account may be enrolled into a particular program and therefore can also be in an Enrollment table, also with millions of rows. I'm trying to find the most optimal way to find any accounts in ACCOUNT that are NOT in the Enrollment table.
I was doing something like this:
select /*+ index(ACCOUNT idx_acct_no) */
a.acct_no
from ACCOUNT a
where a.acct_no not in (Select e.acct_no from ENROLLMENT e);
This takes a VERY long time to execute, even though I am using the index.
I even tried to use the PK on the ACCOUNT table, as it is also a FK on the ENROLLMENT table as such:
select a.acct_no
from ACCOUNT a
where a.id not in (Select e.id from ENROLLMENT e);
this too takes too long to get back (if at all).
Is there a better way to do this selection please?Well if you have the energy to type in the whole list, the syntax you've given will work, unless you blow the permitted number of elements.
But a practical solution would be to turn the list into a table. You still haven't got the hang of this "giving us enough information" concept, so let's presume:
(1) you're on a version of the databasse whoch is 9i or higher
(2) you have this list in a file of some sort.
In which case use an external table or perhaps a pipelined function to generate output which can be used in a SQL statement.
If neither of these solutions works for you please provide sufficient information for us to answer your question correctly. Your future co-operation is appreciated.
cheers, APC -
Hello,
I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".
Suppose ,
Parameter value : person 1,person2,person3
table structure :
Project Name | officers 1 | officers 2
here, officers 1 or officers 2 may contain names of multiple people.
expected OUTPUT : distinct list(rows) of projects where person 1 or person 2 or person 3 is either officer1 or officer 2.
please explain or provide solution in detail
- ThanksHi Visakh,
Thanks for reply.
But the solution you provided giving me right output only if officer 1 or officer 2 contains single value , not with comma seperated value.
Your solution is working fine for following scenario :
Project
Officers 1
Officers 2
p1
of11
off21
p2
of12
off22
with parameter : of11,off22 : it will give expected output
And its not working in case of :
Project
Officers 1
Officers 2
p1
of11,of12
off21,off23
p2
of12,of13
off22,off24
with parameter : of11,off22 : it will not give any row in output
I need patten matching not exact match :)
ok
if thats the case use this modified logic
CREATE PROC GetProjectDetails
@PersonList varchar(5000)
AS
SELECT p.*
FROM ProjectTable p
INNER JOIN dbo.ParseValues(@PersonList,',')f
ON ',' + p.[officers 1] + ',' LIKE '%,' + f.val + ',%'
OR ',' + p.[officers 2] + ',' LIKE '%,' + f.val + ',%'
GO
Keep in mind that what you've done is a wrong design approach
You should not be storing multiples values like this as comma separated list in a single column. Learn about normalization . This is in violation of 1st Normal Form
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How to select all the people that are not in any equipe ?
Hi,
I have a nice SQL expression that gives me as a result all the "AGENTS" (people) that are working in an EQUIPE (a team)
select a."AGENT_ID",
a."NOM" || ' ' || a."PRENOM" "Nom",
c.libelle "Equipe",
a."DATE_EMBAUCHE" "Date embauche",
a."DATE_DEBAUCHE" "Date débauche"
from OBSERVATOIRE."AGENT" a,
observatoire.equipe_agents b,
observatoire.equipe c
where a.agent_id = b.agent_id
and b.equipe_id = c.equipe_id
order by nom
Now, how to select all the agents that are NOT working in any "EQUIPE" (team) ?
I have tried but could not succeed !
Thank you for your kind help.
ChristianChristian from France wrote:
It is not working because the table EQUIPE_AGENTS does not contains a row if the agent is not into any equipe.
CREATE TABLE "OBSERVATOIRE"."EQUIPE_AGENTS"
( "EQUIPE_AGENTS_ID" NUMBER NOT NULL ENABLE,
"EQUIPE_ID" NUMBER NOT NULL ENABLE,
"AGENT_ID" NUMBER NOT NULL ENABLE)
CREATE TABLE "OBSERVATOIRE"."AGENT"
( "AGENT_ID" NUMBER NOT NULL ENABLE,
"GRADES_ID" NUMBER NOT NULL ENABLE,
"NOM" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"PRENOM" VARCHAR2(50 BYTE),
"DATE_EMBAUCHE" DATE NOT NULL ENABLE,
"DATE_DEBAUCHE" DATE)
The only way to "know" if an agent is not into any equipe (team) is to search into the EQUIPE_AGENTS table, and if we do not find the ID of the agent into this table, then we know that this agent is not into any EQUIPE (team).
I don't know ho to translate this into SQL.And that's what my query does. It uses an OUTER JOIN so that a result record is returned whether or not there is a record in EQUIPE_AGENTS. And the check for EQUIPE_ID is NULL restricts the result set to those where there IS NOT a record in EQUIPE_AGENTS.
A more traditional way would be to use NOT IN or NOT EXISTS clauses, but they can prove inefficient. -
Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?
Thanks!
-Adrianthe old apps are on my computer but they have had upgrades since they were put on the ipod originally. you think you would get a warning about this when you restored. I was not worried about losing the progress of the apps but i would have been worried about the app it self!!!!!
-
How to list files that are NOT in a .jar file?
Is it possible to list files (resources, .gif/.jpg files, etc.) that are NOT included in the jar but are still to be considered part of the application somewhere in the jnlp-file?
My applications requires lots of icons which I have put into .gif files. So far I kept them in individual files next to the .jar file and that worked fine.
JWS now seems to support only stuff that is included in (a) .jar-file(s). That in itself woul not be much of a problem, however, when I include my .gif files into the .jar files they seem to get corrupted by the jar-signing process (at least that what's the code says, which can suddenly not handle these images any more).My previous seem to have been non-sense. The .gif file were not corrupted, but rather they were not found at all. They actually must NOT be included in the .jar file, or else they are not found. Strange enough, the .properties-file seemingly HAS to be in the .jar file to be found.
This is something I'll probably never fully understand with java: which file-types it searches where... -
How do you add/use typekit fonts that are not edge web fonts?
I am just trying out the new Muse CC 2014.1 (August) release and was keen to try the new font facilities. As far as I can see that while I can now add other fonts for which I have downloaded web font files via the Self Hosted Web Fonts function, Typekit fonts that are not "Adobe Edge Web Fonts" are effectively unavailable? Have I missed something.
As an example I want to use the Proxima Nova web font family. I have selected it on the type kit site, set them up to Sync via my Creative Cloud account. So for example if I select a font in Photoshop CC or Illustrator, the Proxima Nova fonts appear. Even ok in Word for Mac. They do not appear in Muse.
To add them as self hosted web fonts, I would need to physically download the relevant fonts files and install them on my desktop using the OS-X font tool. However as they are being sync'd via Creative Cloud this shouldn't be necessary should it? Also I don't see an option for doing so on the typekit site.
Any help or guidance would be very welcome.
PS: I seem to have a separate issue with the Creative Cloud app, which is not listing fonts under the Assets tab. But I don't think that is related as they are working fine for Photoshop, etc.Hi David,
I'm sorry that you ran into trouble with this. To add fonts from Typekit to your Muse website, you will want to use the web fonts path instead of desktop fonts. (You can use a desktop font synced from Typekit in your Muse design, but it will exported as an image the same as any other system font.)
There are a couple options for using Typekit web fonts in Muse:
o) The Muse Insider wrote a post on how to insert the Typekit embed code from the Muse interface:
http://museinsider.com/how-to-add-typekit-fonts-to-your-muse-site.html
o) Or you can add the embed code to the Page Properties dialog within Muse, which will include it in the <head> of the page when you export your website. The steps are the same as this tutorial, but you will add the Typekit embed code to Muse instead of into your page directly:
TYPEKIT | Adding fonts to your site
Note that in either case the Typekit fonts will not be displayed in the Muse preview window. You'll need to publish your site to a server in order for the Typekit fonts to be loaded into the page.
If those look like more coding that you are comfortable with, you might try one of the fonts which you can select from the font menu instead. Here are some that are similar to :
https://edgewebfonts.adobe.com/fonts#/?xHeight=high&contrast=low&class=sans-serif&width=re gular
We are also working on a more complete integration of Typekit with Muse in the future, but I can't say yet when that will be available.
>> PS: I seem to have a separate issue with the Creative Cloud app, which is not listing fonts under the Assets tab. But I don't think that is related as they are working fine for Photoshop, etc.
Do you see a "loading" icon in the tab (e.g. a blue spinner wheel)? It sounds similar to this thread; you might try these suggestions:
Re: Adobe Creative Cloud / Desktop App / Home Screen: Constant Spinning Wheel
I hope that this helps; let me know if you have any other questions. Best,
-- liz -
How to create a view for all Service Requests that are not approved by reviewer
Hallo,
I want to create a view in the Service Requests library that shows all SRs that are not approved. How to configure condition that says: if a SR has related Review Activity which is In Progress, show that SRs?
I couldn't find this when creating the view. Thank you.So here's the first problem with that: Which review activity? a SR can contain multiple RAs, so how do we decide if an arbitrary SR is approved or not?
As to the specific language you use (Any child RA is In Progress) you might want to look at the criteria from the default Change approval view, which does something similar:
<QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
<Criteria>
<FreeformCriteria>
<Freeform>
<Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpressionLeft>
<Property>$Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity' TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity']/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property>
</ValueExpressionLeft>
<Operator>Equal</Operator>
<ValueExpressionRight>
<Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Active"]$</Value>
</ValueExpressionRight>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpressionLeft>
<Property>$Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$</Property>
</ValueExpressionLeft>
<Operator>Equal</Operator>
<ValueExpressionRight>
<Value>$MPElement[Name="CoreChange!ChangeStatusEnum.InProgress"]$</Value>
</ValueExpressionRight>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Criteria>
</Freeform>
</FreeformCriteria>
</Criteria>
</QueryCriteria>
This is a simple AND criteria with two componets. one looking for a Review Activity (TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity') which is related to the targetting CR by Contains Activity ($Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity';
Context in this... context means the CR targeted by the view) where it's status (/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$) is In Progress ($MPElement[Name="CoreActivity!ActivityStatusEnum.Active"]$). The other is filtering
for the target change request's status ( $Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$) is In Progress ($MPElement[Name="CoreChange!ChangeStatusEnum.InProgress"]$).
You could convert the second criteria to point to SRs and SR status values, and then use the similar text for the first criteria. i'd recommend
Anton's Advanced View Editor (or
the free version) to do the criteria adjustment. -
Report to Show PR that are not released by release codes
Hello Experts,
I would like to know if there is any report on SAP 6.0 that shows all the purchase requisitions that are not released which shows the releease code (the person's name who has to release the PR). In me55 only could be found by release code, and it is required, I cannot has a report
I think that there is not, but i would like to confirm it.
Thank you in advance,
Best regardsHello,
1)Go to ME5A t-code & select DYNAMIC SELECTIONS.
2)Select "Purchase Requisition" section and you can make use of parameters like Release Code, Release Indicator , Release Status etc., to fetch the required results.
Hope this helps you in resolving your matter.
Regards
Mahesh -
How can I display images that are not included in any collection?
How can I display images that are not included in any collection (some filter or smart collection)? A smart collection with parameters "Collection - contains - empty field" does not work. Lightroom 5.
Thank you! Good idea! I ordered letters of the alphabet (space separated), and it works.
-
I'm running itunes 11.0.3 -
in my iTunes library I can no longer see purchased TV shows and Movies that are not downloaded to my computer.
In my Itunes account i have no hidden TV shows or Movies
I used to be able to view all cloud and downloaded content. I no longer can.There used to be option to show items that are in the cloud in your library, but I can't find where that now is (unless it's been removed). You should be able to see what items that you can re-download via the Purchased link under Quicklinks on the right-hand side of the iTunes store home page (at the top right of that there should be a 'not on this computer' button)
Edit : Just seen your reply, though I don't appear to have that setting on mine.
Maybe you are looking for
-
Poor performance when using bind variable in report
I have a report that takes 1 second to run if i 'hardcode' a particular value into the where clause of the report. However, if i now replace the hardcoded value with a bind variable and set the default value for the bind variable to be the (previous)
-
How do I make my animation look the same in different browsers?
Hi! When I play my animation in different browsers it don't look the same as in the preview. In IE some of the parts of the animation have disappeared and in Chrome the pats are no longer in their right places. See picture below. How do I do to make
-
How to create a session by AppsLocalLogin.jsp
first, in auth.jsp we check fnd_global.user_name against "ANONYMOUS" to see whether user is logged on. if not, we invoke AppsLocalLogin.jsp to create a session. http://server:port/OA_HTML/AppsLocalLogin.jsp?requestUrl=report.jsp%3Fparam1%3Dyyy the lo
-
I just wrote a small program for reading a ASCII file and writting the numbers to Arrays. Files are enclosed for reference. Any suggestion about the programming style quality or what is the best way for LabView programming will be of great help. Than
-
I can not update the adobe creative cloud
I can not update the adobe creative cloud