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
Mastuto
Frequent Visitor

Waterfall Chart based on counts of 2 date fields on the same row item..

Good Morning everyone, 


I've been trying to figure this one out for a few days and have attempted to research online for some solutions, but i'm having a hard time finding use cases for this particular situation.. I'm currently trying to create a waterfall chart in Power BI but based on the count of 2 separate date fields that exist on the same row record. I've included a table with an example of the data set, and an image of what i did to get the desired results in Excel; 

 

in the example, we have accounts that are created that recieve a "Created Date" and a unique "Account ID".  additionally, when an account exits the program, that same record recieves an "Exit Date". I'd like to see the count of accounts created Month over month for the last 2 years (2020 - 2021 YTD), as well as a subtraction month over month when they exit.  On tab 2 highlighted in yellow is the ideal view, where each month represented has a Postitive count for accounts created, and a negative count for accounts left on the appropriate space for their creation and exit month. (I know this duplicates the month, so if a creation and exit happened in jan 2020, we'd see Jan 2020 bar twice, one with a positive and one with a negative view, in our program there will almost always be gains and losses each month)..

 

I believe all we should need is the Account unique ID (could possibly count those vs counting the dates); the created date and exit date.

 

Not every record in the data set will have a created date, but not every record will have an exit date. A created account can have an exit date at anytime after the created date. the created and exit dates exist on the same record line item (same row); 

 

if anyone can assist here that would be fantastic, please see attached, thanks!! 

 

 

Account IDCreated DateLeft Date
552671/1/20205/1/2020
530311/2/20204/30/2020
840872/2/20203/1/2021
778322/6/20205/1/2020
210673/1/20205/7/2020
991004/6/20205/1/2020
238265/9/2020 
329265/25/2020 
847426/7/20201/1/2021
203096/12/2020 
417007/15/2020 
581927/20/2020 
460048/1/2020 
425099/10/20205/1/2021
9857510/18/2020 
3721310/30/2020 
606911/2/20203/1/2021
8565512/21/20203/1/2021
861551/8/2021 
53801/18/20214/1/2021
103202/18/2021 
557942/27/20215/1/2021
404083/21/20215/1/2021
213133/28/2021 
977744/14/2021 
775424/27/2021 
305695/7/2021 
166365/24/2021 

 

Mastuto_0-1622410456276.png

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you, let me review this and i'll get back!

lbendlin
Super User
Super User

You can use one Dates table with active relationship on the create date and inactive relationship for the exit date, or you can use two independent dates tables. What's your preference?

active relationship on the create date and inactive relationship for the exit date i think makes sense, then you can virtually make the relationship on the inactive one active with a DAX formula?

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.