Forum Discussion
Flag for the correct date bracket
I have this (filtered) visual :
because of DateofManufacture it should show the 2nd line (4/20/2023 - 4/19/2028).
So I am trying to come up with some sort of flag to filter on so only the last line will show.
Be aware this is now filtered on 1 delivery, because for this delivery there are 2 lines.
Not all have this.
Was thinking something like when DateofManufacture <= ManufacturingToDate then 1 else 0.
But the result was both 0 so something was not correct.
2 Replies
- amitchandak
Super User
rpinxt , not very clear as both rows have the same date . In this case, you can use rownumber function with the date as order by along with other columns and partition by Shiptocountry , delivery, material , date of manfacturing
and then use visual level filter rownum =1
New DAX Function: Rownumber- https://www.youtube.com/watch?v=yS9-IQjUDwg&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L&index=1
You can also check this report
Latest Date
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0 - rpinxt
Solution Sage
amitchandak the same date?
Yes on 1 field they have the same date but the date that matters is clearly different.
And I am not trying to sort it but to make sure that the line that contains Addendum APL2118363 dissapears by filtering it out.
The blue arrow both lines have the same date, correct.
But the date that determines what to filter out and what to keep in is with the red error.
2 different dates.
Was looking for a measure givining me for example 0 on the first line (because 9/21/2023 is not that reach) and a 1 on the second line.
That way I van put a filter on it to only show lines with a 1.