SSAS Appending Queries - expression

I would like to add a table to my SSAS model by appending two excel tables/sheets.
Import
Appended
Result
Doing this adds the three tables as Expressions and the two tables I wanted to be appended, not the appended table to my model.
I know I can append them using UNION and avoid the problem, I was just hoping someone could explain what's happening and how I can use expressions instead (if possible). Power Query in Excel and Power BI behave differently because there I can hide the two appended tables in the editor and the appended will be added to the model.
Thanks in advance,
Anders

Related

Arrange imported columns after calculated columns in PowerBI

Is there a way to move imported columns after calculated columns? I know I can create a new table by using Selectcolumns, but that'll just balloon the size of the PowerBI data file. Seems like such a miss on Microsoft's part
No there is no way to. I would avoid calculated columns and instead create the additional columns in Power Query which will eliminate your problem anyway.
Simply start all calculated columns with an underscore (judging by your username, you seem to be fond of unnecessary underscores)
Another option would be to put imported and calculated columns into different Display folders (such a miss on user's part)

Oracle SQL View takes only columns but not the data

I created this view
SELECT p1.*, p2.*, p3.*, p4.*, p5.*
FROM proizvodi_1_nivo p1,proizvodi_2_nivo p2,proizvodi_3_nivo p3,proizvodi_4_nivo p4,proizvodi_5_nivo p5
WHERE p2.sif_proizvod_1=p1.sifra_proizvoda_1
AND p3.sif_proiz_2=p2.proizvod_nivo_2
AND p4.sif_pro_3=p3.proiz_nivo_3
AND p5.p_sifra_4=nivo_4_proizvod
and when it's created I can see all the columns' names, but it doesn't retrieve any data. I created many other views in this way but I only have problem with this one. Could it be related to constraints?
Thank you for the help.
you know your result will be the Cartesian product right. You need to optimize your query to work efficiently and you need to change this.
p5.p_sifra_4=p4.nivo_4_proizvod from last column. you forgot p4.

Can I combine datasets in Report Builder 3.0?

I have 3 different datasets. Each pulls from the same datasource, but each has different filters in order to pull data as of a different points in time (12/31/15, 12/31/14, and 12/31/13). Each dataset contains the fields: enum, gender, and YearEnd (YearEnd I created using an expression). Can I combine the data from all 3 datasets into one table or matrix. My ultimate goal is to create a chart to show trends over time, but I can't figure out how to combine the data. Since I have different filters for each, I believe I have to have 3 datasets. I just can't figure out how to append them all into one. Thoughts?
I believe your best bet would be one combined dataset instead of three. Create a dataset that gets you the data for all three dates.
You can filter for the rows you want (date in ('12/31/15', '12/31/14', '12/31/15')) in either your SQL query/stored procedure or in your dataset options (right click dataset, properties, filters).
You can also filter at the table level (right click the outside border of the table, tablix properties).
You can break up your table to show different dates using column and row groups, as defined with group expressions, and use expressions as well to display custom headers (2015, 2014, 2013)
I haven't done much with charts in Report Builder, but from looking at it it looks like you can use filters and groups much the same way.

Altova Mapforce: Joining XML Input and conditional SQL Join using two tables

I'm trying to get the following done: Using Altova Mapforce, I use an XML file with schema as a source. I want to map it to exactly the same output, but only add data to one field.
The value of the field (it's Tax) is determined using a two table SQL join with a WHERE clause over both tables. The tables are joined using foreign keys, the relation is recognized by Mapforce.
The first field of the WHERE clause comes from the first table (header type table), the second and third field from the second tables (lines type tables).
However, I cannot seem to create the logical and correct equivalent of what I am describing here. I've tried it using complex AND constructions where it then inserts the one field I would need multiple times. I've tried WHERE clauses but they fail as they never supply both tables at the same time and there seems to be no way to use a pre-specified JOINing of two tables as a source. The WHERE clause then recognizes only the fields from the first table, not the second one.
Is there an example for this? Joining two (or more) tables, using WHERE to determine the exact row, then using a value from that row?
Best wishes.

Is it possible to traverse rowtype fields in Oracle?

Say i have something like this:
somerecord SOMETABLE%ROWTYPE;
Is it possible to access the fields of somerecord with out knowing the fields names?
Something like somerecord[i] such that the order of fields would be the same as the column order in the table?
I have seen a few examples using dynamic sql but i was wondering if there is a cleaner way of doing this.
What i am trying to do is generate/get the DML (insert query) for a specific row in my table but i havent been able to find anything on this.
If there is another way of doing this i'd be happy to use but would also be very curious in knowing how to do the former part of this question - it's more versatile.
Thanks
This doesn't exactly answer the question you asked, but might get you the result you want...
You can query the USER_TAB_COLUMNS view (or the other similar *_TAB_COLUMN views) to get information like the column name (COLUMN_NAME), position (COLUMN_ID), and data type (DATA_TYPE) on the columns in a table (or a view) that you might use to generate DML.
You would still need to use dynamic SQL to execute the generated DML (or at least generate static SQL separately).
However, this approach won't work for identifying the columns in an arbitrary query (unless you create a view of it). If you need that, you might need to resort to DBMS_SQL (or other tools).
Hope this helps.
As far as I know there is no clean way of referencing record fields by their index.
However, if you have a lot of different kinds of updates of the same table each with its own column set to update, you might want to avoid dynamic sql and look in the direction of statically populating your record with values, and then issuing update someTable set row = someTableRecord where someTable.id = someTableRecord.id;.
This approach has it's own drawbacks, like, issuing an update to every, even unchanged column, and thus creating additional redo log data, but I believe it should be considered.

Resources