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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Daniel_D
Regular Visitor

Create rows based on date values

Trying to create a report from a CRM system to project coming revenue. Unfortunately the build in reporting is not made for subscription services. For each sales case we get one row with expected start date, number of months the project runs and monthly revenue;

deal_nameexpected_start_datemonthly_valuemonths
Client 12021-09-0110 0003
Client 22021-11-0113 0004

 

We are only interested in the month the projects runs so we can assume expected start date is always the first day of the month

I would like to end up with a table like this:

deal_namedatemonthly_value
Client 12021-09-0110 000
Client 12021-10-0110 000
Client 12021-11-0110 000
Client 22021-11-0113 000
Client 22021-12-0113 000
Client 22022-01-0113 000
Client 22022-02-0113 000

 

I´m a bit of a newbie to PowerBi so apprechiate all the help I can get. Thanks!

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

6 REPLIES 6
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 so much Ashish! Worked perfect (just took me some time to adjust it to my full datamodel). Really apprechiate the help!

You are welcome.


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

@Daniel_D 

you can create two columns

Column = 
VAR _date=maxx(FILTER('Table','Table'[expected_start_date]<='Table (2)'[date]),'Table'[expected_start_date])
return maxx(FILTER('Table','Table'[expected_start_date]=_date),'Table'[deal_name])

Column2 = 
VAR _date=maxx(FILTER('Table','Table'[expected_start_date]<='Table (2)'[date]),'Table'[expected_start_date])
return maxx(FILTER('Table','Table'[expected_start_date]=_date),'Table'[monthly_value])

pls see the attachment below.

I am curious why 11/1 is not client 2 and 13000?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for the support! I found a solution that worked i bit better for me this time, but really apprechiate the support!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.