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
cathoms
Helper V
Helper V

How best to add new data into existing dataset from excel

Hi. Looking for ideas/suggestions about adding new quarterly data to an existing report. I built a report from a single Excel workbook with four distinct sheets. These data are for one calendar year quarter of office visits and I need to add another quarter and will need to add more in future. I'm trying to figure out the best way to add in new data and would appreciate any advice you can provide.

 

The sheets for both periods (and all periods in future) have the following columns:

NPILast NameFirst NamePrimary TaxonomyGroupTotal New Office Visits 99202 Freq99203 Freq99204 Freq99205 Freq 99202 Util99203 Util99204 Util99205 Util  99202 Peer99203 Peer99204 Peer99205 Peer 99202 Diff99203 Diff99204 Diff99205 DiffNotes 99202 CMS Util99203 CMS Util99204 CMS Util99205 CMS Util 99201 CMS Diff99202 CMS Diff99203 CMS Diff99204 CMS Diff99205 CMS Diff

 

NPI is National Provider Identifier so each row or 'case' is a provider.  There are also sheets for 99212, 99213, 99214, 99215 Freq, Peer and Diff. The 9920... and 9921... are office visit codes - those with a 0 are new patients and those with a 1 are established patients. For each quarter there are four sheets - established visits > 25, established visits < 25, new visits > 25, new visits < 25.

 

In power query I took this flat file and created a fact table for all established visits, a fact table for all new visits, and lookup tables for Primary Taxonomy, Group, and Provider, resulting in the following model:

cathoms_0-1629467449340.png

What I need help with or suggestions for is how to incorporate another quarter of data. I'm new enough that I am struggling with how best to model and structure the dataset. How can/should I differentiate the new periods? I don't want to just keep adding new fact tables. I could add additional columns but then my existing query will break. On the other hand, if I need to start from scratch, so be it. 

1 ACCEPTED SOLUTION
negi007
Community Champion
Community Champion

@cathoms in your case since you will be adding new data points every quarter, i would suggest to have a new file for each new quarter and then use get data from folder option. You keep adding files for new quarter in the folder and powerbi on refresh will pick data from new files and combine them into one table in powerbi. This way you will not have to keep the same file for all quarter. You will need to ensure that headers in all files are same and powerbi will merge data based on the columns header, column with the same header will be merged into one column.

 

for more details on this, you can refer to below link. 

 

https://sqlitybi.com/loading-multiple-excel-files-from-a-folder-in-power-bi/

 

you can try this method on few excel files to see how it works for you.

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @cathoms ;

You could try to create a new table by dax.

union=var _Q1=summarize('table1',[NPI],[Last Name],[First Name],[Primary Taxonomy]...,"Quarter","Q1")
var  _Q2=summarize('table2',[NPI],[Last Name],[First Name],[Primary Taxonomy]...,"Quarter","Q2")
var _Q3=summarize('table3',[NPI],[Last Name],[First Name],[Primary Taxonomy]...,"Quarter","Q3")
var  _Q4=summarize('table1',[NPI],[Last Name],[First Name],[Primary Taxonomy]...,"Quarter","Q4")
return union(_Q1,_Q2,_Q3,_Q4)

if i understand error  , can you share more infomation about your need and the output you want to show? or a simple after removing the sensetive information.

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

negi007
Community Champion
Community Champion

@cathoms in your case since you will be adding new data points every quarter, i would suggest to have a new file for each new quarter and then use get data from folder option. You keep adding files for new quarter in the folder and powerbi on refresh will pick data from new files and combine them into one table in powerbi. This way you will not have to keep the same file for all quarter. You will need to ensure that headers in all files are same and powerbi will merge data based on the columns header, column with the same header will be merged into one column.

 

for more details on this, you can refer to below link. 

 

https://sqlitybi.com/loading-multiple-excel-files-from-a-folder-in-power-bi/

 

you can try this method on few excel files to see how it works for you.

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

I neglected to mention that I need to set up the report so that end users can view their data by quarter and I need to add in a quarter to quarter comparison. Thus, I don't need to replace the data each quarter I need to add in data each quarter. I think it comes down to how do I differentiate provider data by quarter. Right now my rows are providers. I can't just add in more rows because I would have duplicate NPIs. So how to distinquish Bob Bobson in Q1 from Bob Bobson in Q2?

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.