cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

## Value from 2 tables based on Date

Hello Everyone,

Ok, i have a very naive doubt. Following is the elaboration:

I have value [Quantity] from table 1 and value  [Quantity] from table 2 and i want to show these values in the matrix with the following condition.

If date<= today, table2[value] ,

else table1[value]

and i am clueless about the exact formula that can help me achieve this.

Cheers!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV

## Re: Value from 2 tables based on Date

Hi @Gopal30

Please see the below.

```Measure =
IF(
MAX( 'Calendar'[Date] ) <= TODAY(),
SUM( table2[Quantity] ),
SUM( table1[Quantity] )
)```

Regards,
Mariusz

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

2 REPLIES 2
Super User IV

## Re: Value from 2 tables based on Date

Hi @Gopal30

Please see the below.

```Measure =
IF(
MAX( 'Calendar'[Date] ) <= TODAY(),
SUM( table2[Quantity] ),
SUM( table1[Quantity] )
)```

Regards,
Mariusz

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

Regular Visitor

## Re: Value from 2 tables based on Date

@Mariusz  Thanks a lot!

Announcements

#### Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

#### Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors