98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » PowerPivot
PowerPivot
Resolved · Medium Priority · Version 365
Joanna has attended:
Excel PowerPivot course
PowerPoint Intermediate Advanced course
PowerPivot
Hi,
please can I get advise how can I show only 12 months in my report. Report is going to be updated every month.
Thanks a lot!
JK
RE: PowerPivot
Hi Joanna,
Thank you for the forum question.
You will need a SQL string to do it, but it depends on your source where to write the SQL.
If you source is a database you will do it in the connection wizard, if it is a Excel workbook you will have to do it, like we did it with the forecasting model we did on the course.
The SQL string: (If it is from Excel Workbook)
"Select * from `filepath`.`sheetname$` where "your date column">=DateSerial(Year(Date())-1,Month(Date()),1) and "your date column"<DateSerial(Year(Date()),Month(Date()),0)
The SQL string: (If it is from Database)
"Select * from `Name of table` where "your date column">=DateSerial(Year(Date())-1,Month(Date()),1) and "your date column"<DateSerial(Year(Date()),Month(Date()),0)
I hope this makes sense
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
RE: PowerPivot
thanks Jens,
Can you please advise how I can start writing this SQL sentence in excel?
Joanna
RE: PowerPivot
Hi Joanna,
Can you please tell me where you have the source data.
Do you get the data from an Excel workbook or from a database??
If you have all the months in your data model in PowerPivot, you can just filter the PivotTables.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
RE: PowerPivot
thank you Jens for getting back to me so quickly. I have data from excel file. Yes I can filter 12 months only, but I was wondering if I add more data to the excel file is there a way in sql I could write to always show me last 12 months?
Joanna
RE: PowerPivot
Hi Joanna,
You will need to create a connection to the source workbook.
Go to the Data tab
In the connections group click connections
Click Add and select the workbook with the source data
When you have created the connection go to PowerPivot
Click existing connection on the home in the Get external group
Select the connection to the source workbook and import the data to PowerPivot.
Go to the design tab and click Table properties.
Switch from Table view to Query Editor (to the right)
Type the SQL string and click OK.
I hope this makes sense.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Fri 30 Mar 2018: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Creating a range of monthly payments as textYou could use a formula to create a range of payment ie. payment amount for x% to y% rate with fixed terms and principle. |