Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GRT9791
Frequent Visitor

Measure - different date periods

Hello,

I need help with this issue

I have a table like this in my model PBI:

GRT9791_0-1697542604130.png

In the report, I have a slicer in order to selected different activities and a calendar table with a measure like below.

GRT9791_1-1697543032261.png

The measure must be 1 when the date is within the period of the selected activity (Initial date - End date) and 0 when it is not in the period of the selected activity (like in the image). Unfortunately, my measure works when I have selected only one activity. If I select multiple activities it doesn't work correctly

Any idea how to create the measure?

It's mandatory that the table only includes two columns (date and measure).

Thanks a lot

 

1 ACCEPTED SOLUTION
AilleryO
Memorable Member
Memorable Member

Hi,

 

We are lacking a lot of information to help you, but here are some tracks you might follow...

1/ Maybe you can use a variable in your measure to memorize the activity "treated" and filter only on it. Then filter the next one and so on...

2/ If your test is a calculation is it iterative, row by row ? If yes, are you using a function that iterates ?

Hope it helps, otherwise feel free to tell us more.

View solution in original post

1 REPLY 1
AilleryO
Memorable Member
Memorable Member

Hi,

 

We are lacking a lot of information to help you, but here are some tracks you might follow...

1/ Maybe you can use a variable in your measure to memorize the activity "treated" and filter only on it. Then filter the next one and so on...

2/ If your test is a calculation is it iterative, row by row ? If yes, are you using a function that iterates ?

Hope it helps, otherwise feel free to tell us more.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.