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
EmilLykke
Regular Visitor

Current date in an interval

Hi.

I have a board of customers, in which i count on how many customers are created in the system and how many have had a trial period in a given month. 

Each month I have a report, showing how many customers have been created in a given month. That is not the problem. 

 

I want to show, if a customer have had acces to the trial period in a given month. A trial period have a start and end date. For september I want the count to be 2. Customer 1 and 2 have each had acces to the trial period in some part of september.
I don't know how to make a measure, showing in a given month is in a interval (the trial period).

I hope someone have a solution to my problem. 

 

Thanks! 
- Emil
Udklip.JPG

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I tried to create a sample pbix file like below.

 

Jihwan_Kim_0-1664787779537.png

 

Jihwan_Kim_1-1664787947292.png

 

 

Customers count measure: =
CALCULATE (
    COUNTROWS ( DISTINCT ( Customer[Customer] ) ),
    Customer[Start date] <= MAX ( 'Calendar'[Date] ),
    Customer[End date] >= MIN ( 'Calendar'[Date] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
EmilLykke
Regular Visitor

Thanks for the great and quick help! It works perfectly 🙂 

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I tried to create a sample pbix file like below.

 

Jihwan_Kim_0-1664787779537.png

 

Jihwan_Kim_1-1664787947292.png

 

 

Customers count measure: =
CALCULATE (
    COUNTROWS ( DISTINCT ( Customer[Customer] ) ),
    Customer[Start date] <= MAX ( 'Calendar'[Date] ),
    Customer[End date] >= MIN ( 'Calendar'[Date] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.