Concatenate two more tables in power bi - concatenation

I have 3 tables in power bi e.g
Table1
name
Fan_count
connections.likes.id
connections.likes.name
connections.post.id
connections.post.name
and so on
Table2
name
Fan_count
connections.likes.id
connections.likes.name
connections.post.id
connections.post.name
and so on
Table3
name
Fan_count
connections.likes.id
connections.likes.name
connections.post.id
connections.post.name
and so on
for further kindly check attached power bi file
where i have 3 tables and all have same column name so i want to concatenate
these tables .. how i do this
check file
https://www.dropbox.com/s/zxoyqr3le3qgdlc/social%20media.pbix?dl=0

You can use Combine -> Append Queries -> Append Queries as New to combine these tables into one:
This will make a new table, which will contain all rows from your source tables. In the dialog shown, select Three or more tables option and add your tables to the list:

Related

Connect collection of rows from one table to another table's column - SQL Server

As you save from the image, I have a Packing and a Product table. I want to somehow connect some rows from the product table to the Productlist column of Packing table, so that in future I can add packing in the database and write also what products I have in this packing. How can I achieve this?
If Product List has multiple values in it you should not store them in a single column in the table. You should create a separate table that has PackingTableID and Product so in this new table you would have multiple Products tied to one Package. Then you would join to that table. (a one to many relationship).
Similar to this:
Select PackingTable.PackingTableID , ProductTable.PackageName
From PackingTable
INNER JOIN PackingTableProducts ON PackingTable.PackingTableID = PackingTableProducts.PackingTableID
INNER JOIN ProductTable ON PackingTableProducts.ProductID = ProductTable.ProductID

Two tables in one Crystal Report

I have 2 database tables (MSSQL SERVER) which are CM (Name of Table 1) and REM (Name of Table 2). Is it possible to make it in Crystal Reports just like in the below image?
Using subreports does not gives you the ability you to use common columns, so you must figure out how to use ONE select statement from database to report.
From your snapshot it seems that your tables have 6 common columns (Control,ClientName,DateReceived,RequiredDocs,UploadStatus,Remarks) which you wish to show, and the first 3 of them are used for grouping. So you could use UNION between two SELECT of these 6 columns of your two tables and then implement the grouping in your report designer.
e.g
"SELECT
Control,ClientName,DateReceived,RequiredDocs,UploadStatus,Remarks
FROM CM
UNION
SELECT
Control,ClientName,DateReceived,RequiredDocs,UploadStatus,Remarks
FROM REM"

Database schema for end user report designer

I'm trying to implement a feature whereby, apart from all the reports that I have in my system, I will allow the end user to create simple reports. (not overly complex reports that involves slicing and dicing across multiple tables with lots of logic)
The user will be able to:
1) Select a base table from a list of allowable tables (e.g., Customers)
2) Select multiple sub tables (e.g., Address table, with AddressId as the field to link Customers to Address)
3) Select the fields from the tables
4) Have basic sorting
Here's the database schema I have current, and I'm quite certain it's far from perfect, so I'm wondering what else I can improve on
AllowableTables table
This table will contain the list of tables that the user can create their custom reports against.
Id Table
----------------------------------
1 Customers
2 Address
3 Orders
4 Products
ReportTemplates table
Id Name MainTable
------------------------------------------------------------------
1 Customer Report #2 Customers
2 Customer Report #3 Customers
ReportTemplateSettings table
Id TemplateId TableName FieldName ColumnHeader ColumnWidth Sequence
-------------------------------------------------------------------------------
1 1 Customer Id Customer S/N 100 1
2 1 Customer Name Full Name 100 2
3 1 Address Address1 Address 1 100 3
I know this isn't complete, but this is what I've come up with so far. Does anyone have any links to a reference design, or have any inputs as to how I can improve this?
This needs a lot of work even though it’s relatively simple task. Here are several other columns you might want to include as well as some other details to take care of.
Store table name along with schema name or store schema name in additional column, add column for sorting and sort order
Create additional table to store child tables that will be used in the report (report id, schema name, table name, column in child table used to join tables, column in parent table used to join tables, join operator (may not be needed if it always =)
Create additional table that will store column names (report id, schema name, table name, column name, display as)
There are probably several more things that will come up after you complete this but hopefully this will get you in the right direction.

how to fill a table with using some of the data of other tables

I need to create a new table called “customer” that include some of columns from the “user table”, and also “project table”. I built my suppliers table with specific column names and I need to fill its column by using data of the other tables. Finally I am trying to finish; when user create a new account and project, the customer table automatically fill with some of other two tables varieties with different column names.
INFO: I have three different user types such as “suppliers”, “costumers”, “managers”. I am holding their information(include user types) in one table called users.
Use the following query as an example and write a query to insert the rows to destination table from source table.
Ex:-
INSERT INTO TestTable (FirstName, LastName)
SELECT FirstName, LastName
FROM Person.Contact
WHERE EmailPromotion = 2
Note: Use Join in the select query to join two tables
The 1st step would be to couple the data from the different tables using a table join command. If you can create a search result that matched your new table, then creating the table is simple a call to the below.
Create table CUSTOMER as (Select ...)
"when user create a new account and project.." this is something you plan on doing at run time in your application and not something you need to collate using sql at this point?

MS Access Relationship between 2 tables

I have a Access DB and 2 tables
I need to set the relationships but need some help.
table 1
id
name
address
postcode
room-name
table 2
room-names
Then table 2 contains data:
eg:
kitchen, bedroom etc
How do I do this join so that table1 room-name field contains table 2 room-names list?
The best way to do this is to create a field in table one called "room_name_id" and set it as a Number. It will take up less space in the mdb file over time. (Sidenote: You can't use "name" as a field name since "name" is a reserved word in Access.)
Next create table two so you have an "id" field and a "room_name" field. So if "Spare room" contains id 1 then in table one, room_name_id could be 1.
Here's the SQL that you could use on a query.
SELECT tblInfo.username, tblInfo.address, tblRoomNames.room_name
FROM tblRoomNames INNER JOIN tblInfo ON tblRoomNames.id = tblInfo.room_name_id;
This will show something like "Peter", "Narnia", "Spare room" even though table one has "Peter", "Narnia", "1".
P.S. I use this all the time at work to populate dropdown boxes with options for the user to choose from. This way I can update multiple dropdown boxes just by editing one table.

Resources