Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

True/False Values

Hi Team,

 

Need some help on this, I have Date A and Date B and I need to use a filter like this-:

YEAR([ Date A]) >= 2018 && [Date A] <= [Date B]  , I am also using Date B as filter to filter values. which I have set to Jan 2019 to Dec 2019 and my data is from 2015 till today.

 

Now the problem is this gives me the wrong value and true values are coming. I only get three dates in 2019 that are marked as True rest all going to false. If I create a separate Year column for Date A, it just converts to summarized whole function.

4 Replies

  • Hi Anonymous ,

     

    I am not able to understand your query. Can you please add details like screenshots to your query?

     

    Thanks,

    Pragati

  • Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

    This should work as new column YEAR([ Date A]) >= 2018 && [Date A] <= [Date B] 

  • dax's avatar
    dax
    Community Support

    Hi Anonymous , 

    I am not clear about your requirement, if possible could you please inform me more detailed information(such as your expected output and your sample data )? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi amitchandak  Pragati11  dax 

     

       Column          Type                     Ranges 

      Planned Date   Date                 from 01/01/2015 till 01/05/2020

      Request Date   Date                  from 01/01/2015 till 01/05/2020  

    Amount             whole number   as per source

     

    ** I use date filter from Planned date to choose date range. 

     

    now my requirement is to create a filter based on the request date and Planned date. the formula is 

     

    YEAR([Request Date]) >= 2018 AND [Request Date] <= [Planned Date] 

     

    this gives correct value on Tableau but gives wrong value on power BI.

     

     

     

    Thanks.