Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to display only the latest 5 weeks on a straight table but when I use the 'Fixed number' top 5 It give me a result based on the next column measurement.
My goal is to show the latest top 5 weeks (the most recent ones every week) independently of the measurements.
but if a try max(my_date) or similares it says invalid dimension.
Any idea of how to sort this out?
Thanks.
Hi,
The easy approach, is using if statement in the dimension itself, thus having all the "right" dates for you.
It's an approach I don't really like, and it's one that should bv avoided usually, but maybe it's suited for your scenario.
The second approach, is inserting a set analsys or if inside all the measures.
Let's assume vLast5Weeks is a variable that holds =today()-35
sum({<Date={'>=$(vLast5Weeks)'}>}Sales) / sum(if(Date>=$(vLast5Weeks),Sales))
Hope it helps,
Eliran.
Hi,
The easy approach, is using if statement in the dimension itself, thus having all the "right" dates for you.
It's an approach I don't really like, and it's one that should bv avoided usually, but maybe it's suited for your scenario.
The second approach, is inserting a set analsys or if inside all the measures.
Let's assume vLast5Weeks is a variable that holds =today()-35
sum({<Date={'>=$(vLast5Weeks)'}>}Sales) / sum(if(Date>=$(vLast5Weeks),Sales))
Hope it helps,
Eliran.