Forum Discussion

Ashfaq's avatar
Ashfaq
Regular Visitor
7 years ago
Solved

Year Filter Not Working

Hello Experts,

 

I'm exploring power BI, I just encounter follower error on selectiong year Filter,

Any idea on how to resolve this?

 

  • Hi Ashfaq,

     

    You may have done some change in query editor, right? Text type can't be changed to date type directly so the error happens, as a workaround, you can create a custom column to convert text to date in query editor using function as below than use the custom column instead of original column in your visual:

    Date.FromText(date as nullable text, optional culture as nullable text) as nullable date 
    

     

    Regards,

    Jimmy Tao

2 Replies

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

    Hi Ashfaq

    It looks like an issue with data types mismatch. If you share your file it would be much easier for people to help

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    Hi Ashfaq,

     

    You may have done some change in query editor, right? Text type can't be changed to date type directly so the error happens, as a workaround, you can create a custom column to convert text to date in query editor using function as below than use the custom column instead of original column in your visual:

    Date.FromText(date as nullable text, optional culture as nullable text) as nullable date 
    

     

    Regards,

    Jimmy Tao