Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have got the below case of displaying only 4 weeks of data in Pivot table.
This is my pivot table-
Emp No | Week 51 | Week - 50 | Week - 49 | Week - 48 | Week - 47 |
001 | - | 2 | 4 | - | 1 |
003 | - | 4 | 8 | - | 8 |
004 | - | 8 | - | - | 7 |
002 | - | - | 2 | 7 | 2 |
So now i want to display only last two weeks, Since today is Week-50, I need to display only column Week - 50 and Week-49.
And i am using sum(salary) as Measure. I also need to display only those salary that are Dashes in last 2 weeks .
Like the below -
Emp No | Week - 50 | Week - 49 |
004 | 8 | - |
002 | - | 2 |
Please let me know if you have question.
Thanks in Advance.
No Luck with the Expression.
😞
try this version,
I changed the table pivot to a simple table
the formula is quite long, but I think it answers your need
May be this?
Sum({<EmpNo = {"=Count({<Week = {[>=$(=Max(Week)-1)<=$(=Max(Week))]}>} EmpNo) = 1"}, Week = {">=$(=Max(Week)-1)<=$(=Max(Week))"}>}Sales)
elegant @sunny_talwar formula as usual,
but in case we are in week 1 of the year week -1 must be 52?
I'm still learning 😉
You are right... I would rather use WeekYear instead of Week field to address situations like those.
I tried with my dataset but was not successful in getting the output.
I am looking for the last 4 week data actually. ( I am trying to see Emp who has Dash's in Actual Time for 4 weeks in row)
I am sharing the App below.
let me know your views.
What is the expected output now?
I am expecting to display-
The List of Employees with Dash's or hyphen's for the last 4 weeks in [Actual Time] Measure.
something like this below-
Emp ID | W53 | W52 | W51 | W50 |
00001 | - | 8 | - | 7 |
00002 | - | - | - | - |
02000 | 8 | 8 | - | - |
Why do you have Fin and Book table not connected to each other?
Sorry @sunny_talwar
I guess I missed the connection.
Please find the updated App attached below.
Thanks!