Forum Discussion

Baarathi88's avatar
Baarathi88
Icon for Helper III rankHelper III
6 years ago
Solved

Date Slider for months

Is it possible in Power BI to create a slider based on Date field in month-year format.

 

For Example : Jan-2019, Feb-2019, Mar-2019, etc.

 

Is it possible to have varchar type of data in slider ?

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Baarathi88 ,

    According to my understanding ,you want to change the slicer's display type,right?

    For my test, this is not available currently because the data type of "month-year" is Text and could only be used with the List/Dropdown style. If the data type is "Date" ,then you could use the "Between" style.

    Best Regards,
    Eyelyn Qin

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Baarathi88 ,

    According to my understanding ,you want to change the slicer's display type,right?

    For my test, this is not available currently because the data type of "month-year" is Text and could only be used with the List/Dropdown style. If the data type is "Date" ,then you could use the "Between" style.

    Best Regards,
    Eyelyn Qin

    • Baarathi88's avatar
      Baarathi88
      Icon for Helper III rankHelper III

      Anonymous  Thank you. That's right. But trying to figure out a hack to overcome this and show the text in slider.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Baarathi88 Sorry for not currently, maybe we could submit this idea to the power bi developers

         

        Did I answer your question, please mark my reply as solution,thank you very much~

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Baarathi88 

    you can create a custom column like

    Slicer Column = FORMAT({date], "mmm") & "-" & YEAR([Date])

    and use it as a slicer

    • Baarathi88's avatar
      Baarathi88
      Icon for Helper III rankHelper III

      az38 Thank you.

       

      But my condition is bit different, I want to to have the Jan-2019 in a date slider. Refer to below image

       

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Baarathi88 ,

    According to my understanding ,you want to format slicer's date in “Month-Year”,right?

     

    1.Firstly, you could change the format of the Date directly in Format tabs.

    2.If you don't find what you want, then you could customize the data format and sort the value using the following formula:

    month-year =
    'De'[date].[Month] & "-" & 'De'[date].[Year]
    sort by year-month column =
    De[date].[Year] & "-" & De[date].[MonthNo]

     

    My visualizations look like this:

    Is the result what you want? If not, please upload some data samples and expected output.
    Please do mask sensitive data before uploading.

     

    Best Regards,
    Eyelyn Qin

    • Baarathi88's avatar
      Baarathi88
      Icon for Helper III rankHelper III

      Anonymous  Thank You.

       

      But my condition is bit different, I want to to have the Jan-2019 in a date slider. Refer to below image