Forum Discussion

Lyvili's avatar
Lyvili
Frequent Visitor
2 years ago

Last Update & Range

Good afternoon,

I am experimenting problems to find a solution.

 

I have 4 different sources (System1, System2, System3, System4) and each has a different update date. I need to show in a table data from the all the systems. I want to show an slicer with Last Update and Range where Last Update is the newest common date and if I select Range, I can select from the first date to the newest common date.

 

I create a measure a messure like this:

UltimaActualizacionComunSistemas =
VAR MaxFechaSystem1 = MAX('System1'[Interval Start])
VAR MaxFechaSystem2 = MAX('System2'[Date])
VAR MaxFechaSystem3 = MAX('System3'[Date])
VAR MaxFechaSystem4 = MAX(System4[Change date])
VAR Alldates = {
    MaxFechaSystem1,
    MaxFechaSystem2,
    MaxFechaSystem3,
    MaxSystem4
}
RETURN
    MINX(
        Alldates,
        [Value]
    )
 
The result is OK, as the last common date is 22/03/2024.
 
As Last Update is preselected no issue. The problem arises when I press Range because the created column obviusly does not detect that 22/03/2024 is in the range, that means I can selecte from 01/01/2024 until 21/03/2024, how can I solve It?
 
The formula for the column is:
Slicer Preselection = IF(MAX('Calendar'[Date])=[UltimaActualizacionComunSistemas], "Last Update", "Range")
 
Could you please assist me how can I solve this inconvinient? Thanks in advance!

2 Replies

  • Lyvili , This need to be measure not a column in that case

     

    Slicer Preselection = IF(MAX('Calendar'[Date])=[UltimaActualizacionComunSistemas], "Last Update", "Range")

     

     

    and in case you need a slicer for this, you need segmentation 

     

    Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

    Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

    Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://youtu.be/EyL7KMw877Q

  • Lyvili's avatar
    Lyvili
    Frequent Visitor

    Thank you amitchandak. for your response.

     

    I tried before my previous question also as measure but it does not work either.

     

    That is why I put a filter (button) with the values Last Update and Range. By default Last Update is selected but when I press Range I have an slicer with the calendar date which is supossed to select one mont, one day, whereever I want but it does not include the last Update date. The slicer shows the date but data not.