Forum Discussion

sullynivek's avatar
sullynivek
Frequent Visitor
8 years ago
Solved

calendar list for a specified date range

Hello All,   I want to have a list of dates as my calendar so that the user would be able to click each of these ranges and the outcome would be for my bar chart to dynamically change based on the ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi sullynivek,


    You can refer to below steps to achieve your requirement, if it suitable for your requirement.

     

    Steps:

    1. Write dax formula to create calculated column to store range tag.

     

    Range category = 
    VAR diff =
        DATEDIFF ( [Date], TODAY (), DAY )
    RETURN
        IF (
            diff <= 14,
            "Less than 14 days",
            IF ( diff <= 29, "15 to 29 days", "30 day or older" )
        )
    

     

     

    3. Use above column to create a slicer to enable the filter effect.

     

    Notice: above filter effect also works on other related tables.

     

    Regards,

    Xiaoxin Sheng