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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Using Multiple Identical Data Sets for the Same Visuals

Hello,

 

I am new to the forums and I have looked around and not had any luck answering this question.

 

I will explain in a little more detail:

 

I have a large dataset I would like to break up by month.  An example of the data would be as follows:

 

Date            Name           ID           Country          Region         # of Sales             Total Revenue

 

I would like to bring this data in through several different CSV files (by month) and create visuals as if it were 1 large dataset.  So if i had 6 sets of data for January through June and i wanted to make a bar chart for total sales by month - would that be possible?

 

Please let me know if there is already a thread explaining this - if it is possible and how i would go about formatting it.

 

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

You can append the data

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

if needed

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Preferably convert Month into month start or end date and use date dimension that will make time intelligence easy.

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos.  mark me with @ for more information

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Try this

  1. Append data from the multiple CSV files
  2. Create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table
  3. In the Calendar Table, write calculated column formulas to extract Year and Month: Year = year(calendar[Date]), Month Name = FORMAT(Calendar[Date],"mmmm") and Month Number = MONTH(Calendar[Date])
  4. Click on any one cell in the Month Name column and then go to Sort by column > Month Number
  5. To your visual, drag Year and Month from the Calendar Table.
  6. Write this measure

Revenue = SUM(Data[Total revenue])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Yes, append queries is an easiest and fastest way to achieve it:

Go to Home>edit queries:

Annotation 2020-03-09 110748.png

You can choose append queries as new if you wanna keep the previous queries:

Annotation 2020-03-09 110833.png

 

Here is a related reference.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Greg_Deckler
Super User
Super User

You could use an Append query but the easiest thing to do would be to put all the CSV files in a folder and use a Folder query.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

You can append the data

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

if needed

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Preferably convert Month into month start or end date and use date dimension that will make time intelligence easy.

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos.  mark me with @ for more information

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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