Forum Discussion

jnrezk's avatar
jnrezk
Icon for Helper III rankHelper III
4 years ago
Solved

2 measures in one by date

Hi!  I have 2 measures - one for data before Dec 17 2021 and one for after. We made a change this date so is there away to combine it to one measure so the chart so it's one line before & after the ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi jnrezk ,

     

    How many data table do you have?

    Here are two scenarios:

    1. You have two data tables, one for measure before 2021/12/17, another one for measure after 2021/12/17.

    2. You have only one data table, it contains all values and you create two measures based on it.

    Here I suggest you to create a calendar table with continuous dates by dax. Then relate it with your data table by Date columns. Then create a measure and build a visual by Date column from calendar table.

    I think the odds are that you are in situation 1.

    Measure = 
    IF(MAX('Date'[Date])< DATE(2021,12,17),[Before 2021/12/17],[After 2021/12/17])

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

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