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.
Hello, I am trying to create a counter to display the number of days since the last event in a list (industrial accident for example) and that this be dynamic depending on the choice of the OU or team selected. What the counter should display according to the attached example: Without filter: 1 day (last event on 01/21) Filter on UO2: 12 days (last event on 01/10) Filter on Team2-1: 20 days (last event on 02/01) Any idea on how to go about it? Many thanks in advance.
Solved! Go to Solution.
@Anonymous , Create a measure like this and try
datediff(diffmaxx(allselected(Table), Table[Date]), today(), day)
Write a measure to get the MAX 'Date de l'evenment' - put it on a card
This will respond to your filter or slicer.
Test it. See that it works.
Write a 2nd measure - Assign the current day (UTCTODAY or NOW()) to a variable
Assign the 1st measure to a variable.
Using DATEDIFF, subtract the 2nd variable from the 1st variable.
Put it on a card
Write a measure to get the MAX 'Date de l'evenment' - put it on a card
This will respond to your filter or slicer.
Test it. See that it works.
Write a 2nd measure - Assign the current day (UTCTODAY or NOW()) to a variable
Assign the 1st measure to a variable.
Using DATEDIFF, subtract the 2nd variable from the 1st variable.
Put it on a card
@Anonymous , Create a measure like this and try
datediff(diffmaxx(allselected(Table), Table[Date]), today(), day)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |