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
DebbieE
Community Champion
Community Champion

Creating an 'Open' Measure to show if something is open against a date period e.g month

Im just starting to think about how to display the following

     Start Date        End Date             Fact

A   05/02/2019      06/09/2019        1

B   20/04/2019      03/05/2019         1

C   01/05/2019      29/05/2019         1

 

Obviously if you want to show by Start date you would get the following

     Feb 19    Apr 19    May 19

A    1

B                   1

C                                  1

 

But what happens  you want to display that its open between start and end dates ?

     Feb 19    May 19 Apr 19    May 19   Jun 19 Jul 19 Aug 19 Sep 19 Oct 19

A    1             1          1            1             1          1          1          1         1

B                                1            1

C                                              1

 

Is there an easy way of setting this up as a dax measure so you can create an 'open' Measure to use?

2 ACCEPTED SOLUTIONS

Hi @DebbieE 

 

check this out.

 

PBIX

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

Hi @DebbieE ,

 

try this:

 

 

Fact Start = 
CALCULATE(
	SUM('Table'[Fact]);
	FILTER(
		ALLSELECTED('Date'[Date]);
		'Date'[Date] <= MAX('Date'[Date])
	)
)

 

 

 

Fact End = 
CALCULATE(
	SUM('Table'[Fact]);
	FILTER(
		ALLSELECTED('Date'[Date]);
        ENDOFMONTH('Date'[Date]) < MAX('Date'[Date])
	);USERELATIONSHIP('Date'[Date];'Table'[End Date])
)

 

 

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

11 REPLIES 11

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.