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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
EMGI
Frequent Visitor

Visualisation and Calculation problem

Hello everyone,

 

I'm a Newbie to Power BI and looking for some help.

In an excel-table i have a lot of costumer informations. In each row in separate columns is a StartDate, EndDate and a Quantity. Different quantities generates a new line for a peroid.

 

For example:

ChargeStartDate | ChargeEndDate | Quantity

15.09.2017           30.09.2017         161

01.10.2017           09.10.2017         163

10.10.2017           14.10.2017         162

 

My problem is now to get the quantity for each day. I have no idea how to create a measure/column to get this work.

Finally i just want a matrix table in powerbi with the product in the rows, in the columns each days date and the quantity as the value.

I hope somebody has an idea. Thanks in adavance for your help.

 

Best wishes

EMGI

3 REPLIES 3
Eric_Zhang
Microsoft Employee
Microsoft Employee


@EMGI wrote:

Hello everyone,

 

I'm a Newbie to Power BI and looking for some help.

In an excel-table i have a lot of costumer informations. In each row in separate columns is a StartDate, EndDate and a Quantity. Different quantities generates a new line for a peroid.

 

For example:

ChargeStartDate | ChargeEndDate | Quantity

15.09.2017           30.09.2017         161

01.10.2017           09.10.2017         163

10.10.2017           14.10.2017         162

 

My problem is now to get the quantity for each day. I have no idea how to create a measure/column to get this work.

Finally i just want a matrix table in powerbi with the product in the rows, in the columns each days date and the quantity as the value.

I hope somebody has an idea. Thanks in adavance for your help.

 

Best wishes

EMGI


@EMGI

If you're expecting an output as below, you can reference the attached pbix file.

Capture.PNG

Thanks for your replies.

I tried your solution, @Eric_Zhang, but i have two problems.

1. If the quantity changes, powerbi duplicates the first value for each date

 

problem1.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. The second problem is in the following picture:

problem2.png

 

The imported excel-file looks like that. The red surrounded lines i do not want in my report.

I hope you understand my problem better than before.

 

Thanks in advance...

jthomson
Solution Sage
Solution Sage

Power Query can handle this, I've got a custom column that looks like this:

 

= Table.AddColumn(#"previous step", "newcolumn", each List.Dates([Start Date], Duration.TotalDays([End Date]-[Start Date])+1, #duration(1, 0, 0, 0)))

 

You then expand that list and it'll give you an entry for each date between your start and end date which you can then use in your visual.

 

Also try looking at https://community.powerbi.com/t5/Desktop/Getting-all-dates-between-2-dates/td-p/60577 which has a similar issue/solution

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.