I have two fact tables. I would like to pull columns from a dimension which is part of another fact table using Dax query. The table is coming from a tabular cube. So far I have tried:
EVALUATE
SUMMARIZE(
'vwFCML'
,'Vessel'[VName]
,'Port'[PCountry]
,'PO'[Type]
)
Vessel[VName] and Port[PCountry] dimensions are from the vwFCML fact table while the PO[Type] is from another fact table called OrdTable. I get the error
The column 'Type' specified in the 'SUMMARIZE' function was not found in the input table
I am new to dax and any help would be greatly appreciated, thank you in advance.
This issue happens if the table listed in summarize section has no relation to other tables.
In your case, there is a possibility that the vwFCML table has no relation with PO table.
If you have another table, e.g. Dim_Vessel that is somehow linked to both vwFCML and PO, try using that as the summarize table (even if you are not using any column from that table at all).
e.g.
EVALUATE
SUMMARIZE(
'Dim_Vessel'
,'Vessel'[VName]
,'Port'[PCountry]
,'PO'[Type]
,....
)
Hope this make some sense?
Related
I have this Table:
Table Fluege
and I need to Create a VIEW "Umsteigeverbindungen" with the following colums:
Final Schema
In the first table I have a list of Flights from different airports. And the task is to create a view that shows all the possible "flight-connections" with only one stopover.
for example:
flying from FRA stoping over in DUB and finally landing in LAX.
That is all I have:
my try
I have no idea how to solve this problem. I would really appreciate if somebody can help me fixing this problem.
Thanks
SUM does not take two parameters like you did in sum(fleuge1.Preis,fleuge2.Preis)
sum is an aggregate function , meant to sum all the values on a column, if you want to sum two values from a two distinct sets just do fleuge1.Preis+fleuge2.Preis
if you want to post errors on stack overflow you can just copy them
I have a pivot table, say PivotA, and another table left joined to its primary key, say TableB. I need to edit TableB in the pivot view.
Is it possible to edit the contents of a pivot table at all? When I try to edit a cell from either source, it tells me the recordset is not updateable. It's a very vague error and I haven't found any causes relating to what I'm doing. Even if I recreate the pivot without TableB, I get the same thing.
An updateable record source is one that fulfills a few standards to ensure that Access knows precisely which row needs to be edited. Unfortunately, one of those limitations is that it cannot be updated in an aggregation or calculated field. I believe in most if not all cases, a pivot table is an aggregation of the underlying data. So by design, you will not be able to update data in a pivot table.
Here is a link that may help understand your error: Updateable records
Sorry hate to break it to you but the Access team decided to drop Pivot Tables in 2013. See: https://technet.microsoft.com/en-us/library/cc178954%28v=office.15%29.aspx?f=255&MSPPError=-2147217396
You can see a walk through of alternatives suggested by Microsoft Here: https://youtu.be/VxDWIQaO5Pg
I know that this might seem like a strange question, but let me try and explain it. I have a database table called 'plan' and in it the first column is called 'username' and the columns after it are called 'question1', 'question2' and so on. I now need to add a hundred or so more columns named like this, but it would be nice to have a sql statement that would automatically do that for me.
I know this wasn't set up in the best way, but if you have a solution, please let me know :)
There isn't any SQL command or feature that would do this automatically; sure you can generate the alter table statements and add the columns programmatically; however, your design would be terribly flawed.
Instead of adding columns, you should create a table containing the question, the user_id (or username, whatever is the PK) to hold the records. If you need to identify a question by number (or ID), simply add another column called question_id.
Write the query in sql to excel. Seperate the incrementing number. Drag down until excel row 100. Hard to explain but i guess you ll figure it out. You'll have 100 incrementing add column sql statements. copy paste run it on a query tool.
I've a table that 'll populate columns dynamically like col1,col2,col3... at runtime and i'm copying this table into another table having columns col1,col2,col3,col4,col5 more than this i.e. maximum number of columns it support. But currently when ever i copied dynamic generated table into current table having max columns it giving me error like
Dynamic table columns:
DateInterval, DataType, Seqno, Channel1_data, Channel1_status, Channel2_data, Channel2_status
Table columns used for copying dynamic table:
DateInterval, DataType, Seqno, Channel1_data, Channel1_status, Channel2_data, Channel2_status, Channel3_data, Channel3_status, Channel4_data, Channel4_status
Query:
SELECT DateInterval, DataType, Seqno, Channel1_data, Channel1_status, Channel2_data, Channel2_status, Channel3_data, Channel3_status, Channel4_data, Channel4_status
FROM #TableName
'No value given for one or more required parameters'
Tell me how can i overcome this problem.
Thanks,
#nag
Nag review this posting: Is it ever okay to violate the first normal form
In this posting you will find a way i solved a problem where i needed a variable number of fields, that would grow and shring over time, in a table. It has minimal internal storage while still allowing for enough growth room for my need if the criteria was met.
I'm trying to design some tables and wondering if I'm missing the correct way to do it. For example, I have a 'main' table (would hold any top level generic info) and I have a field in that table 'type'. Right now I have a different table for each 'type' so I'm using if statements to grab the correct info.
So select * from Main -> then using that type field value to determine which table I need to get my more detailed information from. If type is 1 query TableA... if type is 2 query TableB... etc...
Right now this is working... there is a fixed amount of 'types' but I'm pretty helpless on any nice JOIN statements in this scenario.
Does this make sense? Just seems like I'm doing this a really messed up way.... Thanks for any help or suggestions.
Depending on the language you re using, you could generate your SQL dynamically, placing the 'type' table into the dynamic SQL and doing JOINs that way. We do something like this in an application that uses C++, C#, PHP and SQL Server stored procedures, and dynamic SQL is our solution.