Forum Discussion

sainig546's avatar
sainig546
Frequent Visitor
4 years ago
Solved

filter comparing two column

hi is it possible to use a filter in filter pane where created date = updated date

since filter accepts only columns how can we do this

 

  • Hi sainig546 ,

     

    Yes you can achieve this by creating a flag as a calculated column and use it in your filter pane.

    I am assuming you have  created date column in your data in Power BI, then you can create this clculated column using DAX:

    date_comparison_flag =
    IF ( yourtablename[Created Date] = TODAY (), 1, 0 )
    

     Make sure to replace the yourtablename[Created Date] this with your table name and column name.

     

    This above calculation will give you a column date_comparison_flag with values 0/1.

    Then use this column in the filter pane to select date_comparison_flag = 1.

     

    This will filter your report page where created date = today's date.

     

    Thanks,

    Pragati

  • Hi sainig546 ,

     

    You can create a measure like below and use it as filter in your visual:-

     

     

    Measure = COUNTROWS(FILTER('Table','Table'[created date] = 'Table'[updated date]))

     

     

    Thanks,

    Samarth

     

2 Replies

  • Hi sainig546 ,

     

    Yes you can achieve this by creating a flag as a calculated column and use it in your filter pane.

    I am assuming you have  created date column in your data in Power BI, then you can create this clculated column using DAX:

    date_comparison_flag =
    IF ( yourtablename[Created Date] = TODAY (), 1, 0 )
    

     Make sure to replace the yourtablename[Created Date] this with your table name and column name.

     

    This above calculation will give you a column date_comparison_flag with values 0/1.

    Then use this column in the filter pane to select date_comparison_flag = 1.

     

    This will filter your report page where created date = today's date.

     

    Thanks,

    Pragati

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi sainig546 ,

     

    You can create a measure like below and use it as filter in your visual:-

     

     

    Measure = COUNTROWS(FILTER('Table','Table'[created date] = 'Table'[updated date]))

     

     

    Thanks,

    Samarth