Thank you very much Ludovic for taking time to answer to me !
Original Message:
Sent: Feb 01, 2023 07:08 PM
From: ludovic ROBIN
Subject: Mindate or firstdate crossing with a filter
Hi,
First question is : do you have a "date" column in your "Agent" table ?
could you tell us what are the relashionships in your data set ?
If i'm not wrong, you might have related "Time" table to "Agent" one.
Anyway, the usual way of this relation is that your Time table Filters your Agent Table.
What seems to happen here, is that you try to filter your time table by your agent one.
If you have a date column in your Agent Table, then your "date min" measure should be : Date min = min('Agent'[Date])
After that; you can filter your agent table the way you want, you should obtain what you want.
if i'm wrong, smaybe i can help better with the relationship view
------------------------------
ludovic ROBIN
Original Message:
Sent: Feb 01, 2023 09:26 AM
From: Souad MOHAMMED SBA
Subject: Mindate or firstdate crossing with a filter
Hi
I am desperate to find a solution despite the various answers found on this forum:
I have a "date" table => time[Date]
I have an "agent" table => Agent[Agent]
I have a "volume" measure => '_01-Agent Work Measures'[Nb Workflowstep]
=> it means that I cross my agents who have handled X volumes (Nb Workflowstep) at a given date.
I would like to know for each agent, the first date on which it has volumes.
I have tested several formulas which all give me the same result (i.e. my oldest date in my dataset).
Tested :
1/ date min = min('Time'[Date])
Works without filter context, my earliest date is 1/01/2020.
Does not work for my Agent XXXXX for whom the date should be 21/09/2020.
2/ CALCULATE([date min], filter(Agent, Agent[Agent] = "Name of Agent"))
Returns 1/01/2020 => false
Should return the earliest date for this agent.
3/ CALCULATE(FIRSTDATE('Time'[Date]), FILTER('Agent','_01-Agent Work Measures' [Nb Workflowstep]>50))
Returns 1/01/2020 => false
Should return the date from the moment I have a value > 50
4/ CALCULATE(FIRSTDATE('Time'[Date]),ALLSELECTED('Time'[Date]), FILTER(Agent, '_01-Agent Work Measures'[Nb Workflowstep]>50))
Returns 1/01/2020 => false
Should return the date from the moment I have a value > 50
5/ CALCULATE([date min],FILTER('Agent','_01-Agent Work Measures'[Nb Workflowstep]>100))
Returns 1/01/2020 => false
Should return the date from the moment I have a value > 100
Here is a screenshot.
Let me know if you need further details :
Many thanks in advance
Sou
------------------------------
Souad MOHAMMED SBA
------------------------------