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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
FlowViz
Helper III
Helper III

Calculating count of values between dates

Hey folks,

 

Need help calculating something between my [Dates] and [WorkItems History] tables in this report.

[Dates] has a list of dates in it, the [WorkItems History] contains history of items, but specifically interested in the InProgressDate and CompletedDate columns.

Screenshot 2022-04-15 at 17.55.41.pngScreenshot 2022-04-15 at 17.54.25.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I want to know on a given date, how many items are InProgress (i.e. not completed) AND how long they have been in progress on a given date, grouped into - <= 1 day, <= 7 days, <= 14 days and > 14 days in progress. I'm trying to recreate these 2 charts:

Screenshot 2022-04-15 at 18.01.48.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PBIX file is here in case it helps - but really could do with some expertise here as I'm stuck 😞 

2 REPLIES 2
parry2k
Super User
Super User

@FlowViz create the relationship between date table and inprogress date columns, if you already have relationship on another column with the date table and then this new relationship will be inactive which is fine, and you can write following measure to make inactive relationship to active to get the count:

 

InProgress Count = 
CALCULATE ( 
   COUNTROWS ( YourTable ),
   USERELATIONSHIP ( YourTable[InProgressDate], DateTable[Date] ) 
)

 

and to visualize, use a column from the date column and above measure. For the 2nd question, check out this dynamic segmentation blog post and you can tweak it to make it work for you.

 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks for the suggestion. That doesn't quite give me what I'm after:

Screenshot 2022-04-16 at 07.11.46.png

It only shows dates where something goes 'InProgress' not the count of how many items are InProgress on a given date...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.