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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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