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
Anonymous
Not applicable

Distribute dates between start and end date in Direct Query

Hi all,

 

I have a question with which I am struggling for some days already. I have a Power BI dataset which is connected to Dataverse via the Azure SQL connection. I am using Direct Query as the connection type because the client needs to see data in real-time.

 

So far, everything is working fine but there now is a new requirement which is about displaying projects with a start and end date on a timeline (they have a capacity which should be shown for every date the project is going).

 

I have a table which is structured similarly to the following model:

 

Bildschirmfoto 2022-03-30 um 12.13.20.png

 

Now, the goal is to show data in the following format so that I can connect it to the existing date table:

 

Bildschirmfoto 2022-03-30 um 12.15.21.png

 

So far, I have been using approaches similar to the following:

 

 

However, since I am using Direct Query now, there is no option for me to create a custom table and I can also not create a custom column in Power Query as I did in other projects.

 

Does anybody have an idea on how to accomplish that? The data source unfortunately does only provide the format of the first image.

 

Would be great if you could help me with that. I appreciate any answer!

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is no possible to create a custom table in DirectQuery mode, but you can create a table during calculation, like summarize().

Expression you can refer this as below:

vchenwuzmsft_0-1649058076535.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

 

 

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is no possible to create a custom table in DirectQuery mode, but you can create a table during calculation, like summarize().

Expression you can refer this as below:

vchenwuzmsft_0-1649058076535.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

 

 

amitchandak
Super User
Super User

@Anonymous , I have used a measure approach

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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.