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

Fill in previous value if row value is not present in range (0:50)

Hello,

 

I don't know how to solve the following question. Maybe someone can help me. I have a dataset where I have the number of customers which joined per month and year (e.g. January 2018) and left x months later. 

Example dataset

 

Year_JoinedMonth_JoinedLeft_after_monthsAmount_of_customersStill_Left
20180102720
20180113718
20180134714

 

So you can see the "Left_after_months" = 2 is missing, but not for each month _joined+ year_joined combination. If this is the case there should be filled in a row with 0 churned customers

Year_JoinedMonth_JoinedLeft_after_monthsAmount_of_customersStill_left
20180120718

 

This should be done for all values of Left_after_months between 0 and 50 for each Year_Joined and Month_Joined combination.

 

I would use the information in a line chart. Currently it looks like this:

 

LSE95_1-1618479138883.png

 

 

So you can see one line chart per month in 2018, where each data point gives the number of customers which are still here after "Anzahl_Monate" (the amount of months). Unfortunately when no customer left in one specific month there is no row in the data.

You can see that at "Anzahl_Monate" = 0. Not every line has data there. How can I fill in rows per month and year if there is no row for example for "Anzahl_Monate" = 0?

 

I highly appreciate your answer and effort.

 

Best regards,

LSE95

 

1 ACCEPTED SOLUTION
LSE95
Frequent Visitor

I solved it by changing the underlying data in the SQL Server.

View solution in original post

2 REPLIES 2
LSE95
Frequent Visitor

I solved it by changing the underlying data in the SQL Server.

CTozzi
Resolver I
Resolver I

@LSE95 would you create a measure to calculate the total of customers on the last date of the month and use it for your visualization?

 

Balance of Customers :=
CALCULATE (
SUM ( TableName[StillLeft] ),
LASTDATE ( TableName[DateColumn] )

)

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.