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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jr3151006
Helper IV
Helper IV

Sould Products (Table1) and sold services (Table2) both from .CSV - how to compare sales by year

Hi,

 

I´m curious about this scenario; we have two .CSV files listing all 'OrderID, Date, Value, Customer Name' for product and another .CSV file with same fields but for services.

 

>>>We would like to compare wether in 2015 we sell more Products or Services (for year 2016 and 2017 also).

 

Should we create a third table to mix values and create on it a new colun to specify when it was 'Services' and when it was 'Product'?? Or there is another way to compare them?

4 REPLIES 4
WolfBiber
Employee
Employee

Hey there,

it depends. if you have the same Columns and metadata in both tables you can append them and add some kine of Type Column.

Or you can create two fact tables with same dimension tables belonging to them.

 

Greetings.

Hi WolfBiber,

 

tks for quick reply, the data on .CSV is the same but for Services table we should 'split' a collumn for sales ID on '02' new columns because we have 02 information on only one field. Another point is that the original column came from .CSV with a 'text' so we createad a new one column with Dax function to ignore it:

 

RIGHT('Table-Services'[RPS_Original];LEN('Table-Services'[RPS_Original])-4)

 

Can you explain a little bit about:

Or you can create two fact tables with same dimension tables belonging to them.

 

hey, without seeing your data its hard to say which of them is the best way.

 

for your question:

You can have several Fact Tables with dimension linked to all of them.

Please find further information in tutorials of Power Bi and Star Schema (Snowflake Schema)

or google for "multiple fact tables in power bi".

 

 

Tks WolfBiber,

 

it was a "north" to me, I'll check.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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