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
Anonymous
Not applicable

SAME PERIOD LAST YEAR not working when drill down in matrix preview

 

29-06-_2017_14-52-00.png 

 

29-06-_2017_14-31-40.png

 

 

Hi there,

 

I used SAMEPERIODLASTYEAR which works fine to filter the sales of the last year on the first two levels of a matrix preview.

But when I drill down to the 3rd level an error occurs. "SAMEPERIODLASTYEAR is expecting a coherent selection.."

 

VJ 1 = CALCULATE(SUM('Sales cube'[Umsatz]); SAMEPERIODLASTYEAR('Sales cube'[Date.Month])) 

 

I have the feeling this should be possible..what am i missing?!

 

Matt

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Please refer to this similar thread to see whether it helpful to you:

What is contiguous selection?

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

In my test, I was not able to reproduce your scenario. I didn't encounter above error when I drilled down to the 3rd level.

 

For further analysis, please share some detailed data, if possible, you could upload your pbix file. Also, what is the detailed error? Please translate the whole error message into English.

 

By the way, what is the data type of column [Date.Month]? As I know, we can only refer to a date column inside SAMEPERIODLASTYEAR function.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

30-06-_2017_10-40-02.png

 

 

 

Hi and thx @v-yulgu-msft

On the printscreen I drill down on the month April twice. If I drill down on a specific month, the error doesn't occur but also no data is shown in the column "Random VJ"

 

 

the error occurs when i press "switch to next hierarchy" twice. (double arrow button)

Error:" The function "SAMEPERIODLASTYEAR" is expecting a coherent selection, if the datarows are not explicit, contain gaps or a time-dimension."    hope I translated well:)

 

yes, data type of [Date.Month] is date 

 

Regards

Matt

 

 

 

 

Hi @Anonymous,

 

Please refer to this similar thread to see whether it helpful to you:

What is contiguous selection?

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

thats it! thank you @v-yulgu-msft

Matt

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.