Forum Discussion

aJ2's avatar
aJ2
Helper I
7 years ago
Solved

Using comparison operators with 'Date' data type

Hi.   I have created two measures for a common purpose ie i want to calculate the conversions before July 2018 from one table A and from July 2018 from another table B. When I want to split it betw...
  • aJ2's avatar
    aJ2
    7 years ago

    Hi rajulshah

     

    I was able to filter according to the dates by using the FILTER() function.

     

    The formulas are- 

     

    conversions app new = CALCULATE(SUM(tableA[conversions]), FILTER('date', FORMAT('date'[date_key], "yyyy-mm") > "2018-06"))

     

    conversions app new = CALCULATE(SUM(tableB[conversions]), FILTER('date', FORMAT('date'[date_key], "yyyy-mm") < "2018-07"))

     

     

    Thank you for your assisstance.