cancel
Showing results for
Did you mean:
Frequent Visitor

## Calculate value between two dates if date falls between two dates in another table

What I am trying to accomplish create a calculated column in my date table to return the value of a column from another table where I only have a start and end date. It should be pulling in the value of 'Event Header_Basic'[POS Event Code], if DimDate[Date] is between 'Event Header_Basic'[Date Start] and 'Event Header_Basic'[Date End].

What I've tried is:

```Column = CALCULATE(
FILTER(
)
)```

I recieved an error "A table of multiple values was supplied where a single value was expected.".

Does anyone have any other suggestions?

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support Team

## Re: Calculate value between two dates if date falls between two dates in another table

You may use DAX below.

```Column =
CONCATENATEX (
FILTER (
'Event Header_Basic'[Date Start] <= ( DimDate[Date] )
&& 'Event Header_Basic'[Date End] >= ( DimDate[Date] )
),
","
)
```
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Calculate value between two dates if date falls between two dates in another table

You're the best, thanks!

3 REPLIES 3
Highlighted
Community Support Team

## Re: Calculate value between two dates if date falls between two dates in another table

You may use DAX below.

```Column =
CONCATENATEX (
FILTER (
'Event Header_Basic'[Date Start] <= ( DimDate[Date] )
&& 'Event Header_Basic'[Date End] >= ( DimDate[Date] )
),
","
)
```
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Calculate value between two dates if date falls between two dates in another table

You're the best, thanks!

Visitor

## Re: Calculate value between two dates if date falls between two dates in another table

I have a similar case and this DAX "almost" works for me, the only challenge that I have is that I have multiple lines with multiple results, hence I end up getting something like "A,A,A,B,B,B,C,C". How can this formula be modified if I have 1 or 2 more criteria (columns) to match?

Rgds,

Fer

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 6 members 1,461 guests
Recent signins: