Forum Discussion

sabi_9's avatar
sabi_9
Frequent Visitor
8 years ago

two separate date column on same chart

I have two separate date columns as a start date and end date, can i use both of the differently as a relative date slicer on a single chart so that i can get the result accordingly? 

2 Replies

  • jthomson's avatar
    jthomson
    Solution Sage

    What exactly you're wanting isn't clear from your post, but if you make a date table and relate your start/end date fields to it then you should be able to get what you want from using that

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi sabi_9

     

    From your description, if I understand your requirement correctly, you want to use two different date in a single slicer to filter the result .

     

    You could  refer to these steps:

     

    1.create the Date table: 

    Date = CALENDARAUTO()

     

    2.You could create the measure below and use it as a visual filter level:

     

     

    Measure = 
    VAR currentDate =
        MAX ( 'Date'[Date] )
    RETURN
        CALCULATE (
            COUNTROWS ( 'Table'),
            FILTER (
                'Table',
                ( 'Table'[start_date] <= currentDate
                    && 'Table'[end_date] >= currentDate )
            )

     

    You also could refer to this similar thread.

     

    If that is not in this case, could you provide the data sample or the picture of the result you want to have, then I can help you further? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

     

    Best Regards,

    Cherry