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
Anonymous
Not applicable

How to calculate a measure using a date column?

Hi, I have a dataset like this. There are only two sprints in one month, the first one starts on 1st day of the month and end by the 14th whereas the second one starts by 15th and ends by 30 th.

 

Sprint     Story      Date Created(mm-dd-yyy)

AA          1             1/1/2021

AA          2             1/2/2021

AA          3              1/7/2021

BB          4              1/15/2021

BB          5              1/18/2021

BB          6              1/22/2021

 

I want to calculate the total count of stories(measure) for the first 3 days of each sprint, which means between Day 1-3 whenever we are in first sprint and the first 3 days for the second sprint(day 15-18) whenever we are in the second sprint, regardless of the month and year . Any thoughts?

 

The expected outcome should be

Sprrint AA count- 2 stories

Sprint BB Count- 2 stories

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous Well, you could get the minimum day for a sprint using MINX(FILTER(...),...) and then you could get the upper range by taking that variable and adding 3. Then you could filter the table by that range > min && < max.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

@Anonymous Well, you could get the minimum day for a sprint using MINX(FILTER(...),...) and then you could get the upper range by taking that variable and adding 3. Then you could filter the table by that range > min && < max.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.