powerpivot

Forum home » Delegate support and help forum » Microsoft Excel Training and help » PowerPivot

PowerPivot

resolvedResolved · 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.


 

Excel tip:

Creating a range of monthly payments as text

You could use a formula to create a range of payment ie. payment amount for x% to y% rate with fixed terms and principle.

The text that would be "between Xamount and Yamount".

Here is how to do it.

1 Use the PMT function to get your monthly payments figure or whatever frequency of payments that you choose he start range.

See PMT under Excel Help

2. Nest these in the ROUND function to round decimals see ROUND under Excel Help


3. Concatenate this using "&" and concatenate " to " and concatenate "Between ".

4. Concatenate the above to PMT function for the end range

ie.

="Between "&ROUND((PMT1),decimal places)&" and "&ROUND((PMT2),decimal places)

View all Excel hints and tips


Server loaded in 0.07 secs.