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

Creating a new date table

I am trying to create a new table where each column is the last date of a month and the values can be derived using values from other tables. When I try to create a table with dates, the dates appear in row instead of columns. How can I make a new table where each column is last date of the month?

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @abhinav 

You can use the EOMONTH function to get the date of the last day of each month. What kind of output do you want?

It is better if you can provide a simplified PBIX file. Please exclude the sensitive information before share these information. Thank you.

Best Regards,

Charlotte Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mahoneypat
Employee
Employee

Please share an example of what your desired output table would look like, and what inputs you would use.  Also, why do you want a table structured that way?  It may not be the best model structure for analysis/visualization.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I have an excel file with a table which has some data for different fields with amount, start date, end date, etc.

Input Table:

inputinput

I want to create two tables in power bi which are created using normal distribution on amount for every month between start date and end date for every row.

Output Table 1:

output1output1

Distribution Formula 1:

formula1formula1

Output Table 2:

output2output2

Distribution Formula 2:

formula2formula2

The output table cannot be created beforehand in excel. Only the input table is available and I want to create the output tables in PowerBI.

How can I create something like the output tables attached or is there a better way to do this?

speedramps
Super User
Super User

Please consider this solution and click the thumbs up and accept solution. 

 

In Edit query add a new column with
= Date.AddMonths( [previousdate] , -1 )


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.