Forum Discussion
Load multiple excels but results is not correct
Greg_Deckler Got it. That makes sense. But now I want to create the reports in power bi to compare different planning sheet generated within last 30 days. That's why I originally wanted to load last 30 days file and combine them into one big report, so I can compare the value based on when that report is generated. But if that way doesn't work, is there any work around I can do in BI to do such comparison? Thanks
naoyixue1 Sure, the specifics are going to depend on your particular data model but here is a video that shows all kinds of different date intelligence calculations (see below). The basic pattern is something like the following:
Total Last 30 Days Measure =
VAR __MaxDate = MAX('Table'[Date])
VAR __MinDate = __MaxDate - 30
VAR __Table = FILTER( ALL( 'Table' ), [Date] >= __MinDate && [Date] <= __MaxDate )
VAR __Result = SUMX( __Table, [Value] )
RETURN
__Result
- naoyixue13 years ago
Post Patron
Greg_Deckler Thanks, but i don't think that can solve my porblem. We set query to daily extract the data from planning syste. Each vesion just has the Day to go information. I want to load the last 30 days individual files into BI, so I can make the comparsion between two different snapshot of time when we extract the info from planning system. That's why I originally applied the combine file Unfortunately it always pulls the oldest file Day to Go info.....
To me, that measure doesn't support the comparsion purpose for any two different snapshot of the file. But thanks for your heklp.
- Greg_Deckler3 years ago
Community Champion
naoyixue1 Well, if it were me, I would load the files but keep the "Date modified" column as part of the table that you end up with. That way, you could compare any day to any other day or compare the latest day to the 30 days ago. That would be my approach if you don't have a date in your Excel files.