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
emiliosjlc
New Member

How to create a KPI wich shows the same period of the last year with this year

Hello,

I have a table with this data,

DATE     VALUE

1/1/16  36

2/2/16 20

...

1/1/17 67

2/1/17 45

 

I want create a KPI wich compare the same period of the last year with this year., that is, indicator: Value, Trend:Date and target value: Last year value.

 

Thank you very much.

Best regards

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @emiliosjlc,

 

Current power bi not support to create kpi, you should create it in powerpivot then import the workbook into power bi.

 

Reference:

Create a KPI in Power Pivot for Excel: Overview

 

In addition, you can use below formula to get the same period of last year value:

SP LY = CALCULATE(SUM('Fact'[Amount]),SAMEPERIODLASTYEAR('Calendar'[Date]))

 

1.PNG

 

Notice: calendar table has the relationship to fact table.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @emiliosjlc,

 

Current power bi not support to create kpi, you should create it in powerpivot then import the workbook into power bi.

 

Reference:

Create a KPI in Power Pivot for Excel: Overview

 

In addition, you can use below formula to get the same period of last year value:

SP LY = CALCULATE(SUM('Fact'[Amount]),SAMEPERIODLASTYEAR('Calendar'[Date]))

 

1.PNG

 

Notice: calendar table has the relationship to fact table.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
dilumd
Solution Supplier
Solution Supplier

if you can give a sample data set with expected coloums in excel we can look in to it.

Yes, of course. This is my data...to 2015 until 06/30/2017

Captura.PNG

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.