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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kelvinteoh
Regular Visitor

Help me on Power Bi

Hi everyone,

 

kelvinteoh_0-1690167142373.png

On here i have 3 points that not really understand how to create it using raw data. 

Please help me with this part 

thanks.

1 ACCEPTED SOLUTION
eliasayyy
Memorable Member
Memorable Member

hello the first part is creating relatiosnhips 

you have 3 kinds of relationships :

one to one : you have in both tables 1 primary key (unique id) for each value

One to Many and Many to one : when you have 1 table that has unique primary key while otehr table has numerous duplicates of the value like making a relationship between calendar table and sales table by the date column

many to many is when you have multiple values of same data in both tables and no unique key (this relationship should be minimized as possible as it can create circular dependacy and make other relationships inactive)

its a good practice to always create dim tables which means create a table with unique primry key for each item or date for example like a dim Date table where you have 1 unique date in the whole sheet or dim customer which shows each customer id ,

for the second part of the question , creating new fields means where all the calculations happens , the measures and calculated columns , i prefer creating measures over calculated columns because they are faster and it is a better practice .
 
finally ,you have optimization which means hide columns you arent using or sort the data rows so you can better understand them and spot trends easier


so in a very broa dexample lets say you have 2 tables , sales table that contains 2 columns : date and sales and you have a calendar table that has 1 column Date

first you createa  realtionship between calendat date and sales date ,

next you create a measure for example called Total Sales which is Total Sales = SUM('Sales Table'[Sales]) 

and finally insert in a line chart on the x-axis the date from calendar table and on y -axis insert the emasure Total sales 

View solution in original post

2 REPLIES 2
eliasayyy
Memorable Member
Memorable Member

hello the first part is creating relatiosnhips 

you have 3 kinds of relationships :

one to one : you have in both tables 1 primary key (unique id) for each value

One to Many and Many to one : when you have 1 table that has unique primary key while otehr table has numerous duplicates of the value like making a relationship between calendar table and sales table by the date column

many to many is when you have multiple values of same data in both tables and no unique key (this relationship should be minimized as possible as it can create circular dependacy and make other relationships inactive)

its a good practice to always create dim tables which means create a table with unique primry key for each item or date for example like a dim Date table where you have 1 unique date in the whole sheet or dim customer which shows each customer id ,

for the second part of the question , creating new fields means where all the calculations happens , the measures and calculated columns , i prefer creating measures over calculated columns because they are faster and it is a better practice .
 
finally ,you have optimization which means hide columns you arent using or sort the data rows so you can better understand them and spot trends easier


so in a very broa dexample lets say you have 2 tables , sales table that contains 2 columns : date and sales and you have a calendar table that has 1 column Date

first you createa  realtionship between calendat date and sales date ,

next you create a measure for example called Total Sales which is Total Sales = SUM('Sales Table'[Sales]) 

and finally insert in a line chart on the x-axis the date from calendar table and on y -axis insert the emasure Total sales 

Hi @eliasayyy,

 

thanks for the idea i will try it out 

and sorry for late reply. 😇

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.