Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Prasad1
Helper I
Helper I

Creating Master Data tables from Transaction data file

Hi

I have a huge Sales transaction file which contains many columns from Company code to SKU code with Codes and Descriptions across multiple fields (From A to Y as showed in the attachment). I want to create mulgipld 'Master Data' Dimension tables and 'Transaction Data' fact table from this Sales file. For e.g. Sales file contains Warehouse IDs, Warehouse Descriptions (repeated multiple times for different Products under same warehouse). I want to create 'Warehouse Master' Dimension table by taking Distinct values of Warehouse ID, Warehouse Descriptions from the sales file.

Similarly from the sales file,  I want to create

a) 'Category Master' Dimension table by taking distinct values of Category ID, Category Description

b) 'Source Country Code Master' Dimension table by taking distinct values of Source Country ID, Source Country Description

c) 'Product Master' Dimension table by taking distinct values of Product ID, Product Description

 and so on.

Doing it with excel is tedious and time consuming by copying the transaction file multiple times, keeping relevant columns by removing other columns and deleting duplicates etc. Is there a better, easy way to do it in Power BI?

 

Thanks for your help in advance

Prasad

Transaction to Master tables.JPG

 

 

3 REPLIES 3
erik_tarnvik
Solution Specialist
Solution Specialist

Hi @Prasad1,

I just wrote an example for someone else asking what I think is the same or at least a very similar question. Hopefully you will find it helpful.

 

https://community.powerbi.com/t5/Desktop/power-bi-scripting-data-load/td-p/272021

Prasad1
Helper I
Helper I

Hi

 

I tried using Distinct function for creating the master table. But Distinct gives only one column with distinct values. I want the Code as well as the Description in one Master Dimension table.

 

Thanks

Prasad

Anonymous
Not applicable

Hi @Prasad1

 

Can you provide a sample record set of say 1000 rows in excel format. Load the same in One Drive or Google Drive and share the link.

 

It is possible to do it using PowerQuery.

 

Cheers

 

CheenuSing

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors