Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am currently trying to figure out a way to display data on a visualization from previous year. My example is that I want to show on a KPI the retired workers from last year, but always from last year . Also I dont want to tinker with the loading, is there a way to solve this in the measure formatting?
Here is a dummy table:
Name Startdate Enddate Retired
A 2015.10.12 2019.08.09 Yes
B 2016.11.03 2020.09.10 Yes
C 2017.05.12 2025.09.07 No
D 2018.07.25 2019.03.04 Yes
So right now this should be showing 1 person (current year 2021), but last year it would show 2 people
Thanks in advance for your help.
Hi!
Thank you for your help, the first measure worked fine but the second one returned 0 value because in the enddate filed the max year was 2025, so it wasnt dynamic. But I created a field which will always bring out the last year (Year(Today())-1. And changed the variable so it brings out data from the the new Field instead of the Enddate field. And so it brought out the correct answers. Thx for help.
hi,
result:
ksrinivasan
Thanks ksrinivasan! But my boss wants to look it as a Kpi, he just wants to see the sum amount like this:
Any ideas to this?
hi,
sry for delay
1st measure: Count({$<End_dt = {'$(=vMaxenddt)'}>}([Name ]))
2nd Measure: Count({$<End_dt = {'$(=vMaxenddt-1)'}>}([Name ]))
create variable:
Script
Ret:
LOAD
"Name ",
"Startdate ",
Year("Enddate ") as End_dt,
Retired
ksrinivasan
Hi!
Thank you for your help, the first measure worked fine but the second one returned 0 value because in the enddate filed the max year was 2025, so it wasnt dynamic. But I created a field which will always bring out the last year (Year(Today())-1. And changed the variable so it brings out data from the the new Field instead of the Enddate field. And so it brought out the correct answers. Thx for help.