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.
Hi all,
I am trying to find out a way how to display the latest date of occurence from a specified list.
My parameters from a datasets to make the filter are:
Incident Type.Type: Personal
AND
Incident Type.Subtype: Restricted Work Case OR Lost Time Accident OR Medical Treatment
AND
Incident Report.Incident Party: Company
Which I took care of on a visual level filter ( I am using the Card type visual).
However, when I specify that I want to see the last date (or the first date) it is not displaying the correct date. This is what I got with the last date:
29-Oct-15
And this is with the first date:
15-Oct-15
But the correct date should be:
27-Jul-16
Anyone has any suggestions how to fix it? Or how do I do that?
Thanks a lot,
Kristina
Solved! Go to Solution.
Is your [DateToLink] column formatted as Text? If this is the case I recommend you change it to be Date or DateTime type.
I suspect it is showing in Alphebetic order rather than Numeric/or Date
You can also create measures that look for the first/last date once you have it converted to Date (or DateTime)
Thanks Phil_Seamark,
it helped indeed.
But then I have another question:
I need to calculate the number of days between the last date of occurence and today. And the TODAY () function does not seem to work the way I was hoping for in this measure:
DATEDIFF = DATEDIFF(TODAY(),MAX(HseqAnalysis[Date.Date - as date].[Date]),DAY)
As it gives me the difference between today and the end of year instead of number of days for difference between today and the last date of occurence (which if today = 27/02/2017, the difference should be 215 days.)
Does anyone know how to solve it, please?
Thanks a lot!
K.
Is your [DateToLink] column formatted as Text? If this is the case I recommend you change it to be Date or DateTime type.
I suspect it is showing in Alphebetic order rather than Numeric/or Date
You can also create measures that look for the first/last date once you have it converted to Date (or DateTime)
Hi @kbachova,
In your scenario, why the first date is 15-Oct-15? In your sample data, it seems that the first date is 17-Aug-15. You can create a measue or calculated column to get the first date by using Max function.
https://msdn.microsoft.com/en-us/library/ee634228.aspx
If this is not what you want, please elaborate your report structure, so that we can make further analysis.
Regards,
Charlie Liao
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |