cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
charlyrosero Regular Visitor
Regular Visitor

SamePeriodLastYear - Show only current year

Hi 

 

i have a measure that calculate the same period of last year. but now only i need to show the current year (2019) in a graph with the measure which calculate the values for the periods of last year. 

 

Last Period = IF(ISBLANK([Current Period]) , BLANK(),CALCULATE([Current Period],SAMEPERIODLASTYEAR(DimTiempo[dtmFecha])))

this is my data set, i use a dimension time 

 

dtmFechaCurrent PeriodLast Period
2018-01-312278340 
2018-02-282372211 
2018-03-312314696 
2018-04-302348998 
2018-05-312389455 
2018-06-302415532 
2018-07-312421830 
2018-08-312448374 
2018-09-302466315 
2018-10-312462091 
2018-11-302452573 
2018-12-312505053 
2019-01-3124667772278340
2019-02-2824506652372211
2019-03-3124692682314696
2019-04-3024799562348998
2019-05-3124916162389455
2019-06-3025206592415532
2019-07-3125989132421830

 

Sin título.png

how can i do that ? only show the data for current year (2019)

 

dtmDateCurrent PeriodLast Period
2019-01-3124667772278340
2019-02-2824506652372211
2019-03-3124692682314696
2019-04-3024799562348998
2019-05-3124916162389455
2019-06-3025206592415532
2019-07-3125989132421830
1 ACCEPTED SOLUTION

Accepted Solutions
charlyrosero Regular Visitor
Regular Visitor

Re: SamePeriodLastYear - Show only current year

The solution was simply add a filter in last period measure with the condition is not blank. as simple as this. thank you so much 

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

Re: SamePeriodLastYear - Show only current year

Could you restate that question with perhaps some sample data? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.

 

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

charlyrosero Regular Visitor
Regular Visitor

Re: SamePeriodLastYear - Show only current year

The solution was simply add a filter in last period measure with the condition is not blank. as simple as this. thank you so much 

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors