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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jackperry61
Frequent Visitor

Date changing when uploading to service

Good afternoon,

 

I have a report which I am uploading to the PowerBI service from my desktop app. In the desktop app there is a list of contracts called PBI_RentalContractLines. Each Contract has a rental billing start date, and a rental billing end date. I am using the below function to create a new table, with one line per each day between the rental billing start/end dates. Each line is then tagged as either "Ancillary Revenue" or "Rental Revenue" depending on an if function. This data is then put into a matrix with each contract's revenue split out over the contract period, and the ancillary revenue allocated to the start date.

 

This works perfectly in the desktop app, but the issue I am having is when I upload the same report to the Service, the data initially shows fine, but after an incremental refresh the 'LineRentalDate' on the ancillary revenue changes to 30/12/1899.

 

I have checked all of the formatting and all of the date columns have the same formatting, which is Data Type: Date/Time and Format: (General Date)

 

Here is the data in the desktop app, and how it appears at first in the service:

jackperry61_0-1731510870074.png

 

 

Here is how the data appears after an incremental refresh in the service:

jackperry61_2-1731511037037.png

 

 

This is the formula used to generate the table:

DailyBilling_RentalLineRentalAmountsWithDates =
FILTER(
    GENERATE(
    PBI_RentalContractLine,
    VAR StartDate = PBI_RentalContractLine[FC_RentalBillingStartDate]
    VAR EndDate = PBI_RentalContractLine[FC_RentalBillingEndDate]
    RETURN
        SELECTCOLUMNS(
            CALENDAR(StartDate, EndDate),
            "LineRentalDate", DATE(YEAR([Date]), MONTH([Date]), DAY([Date]))
        )
)
 
Thanks for your help in advance!
Jack
4 REPLIES 4
KNP
Super User
Super User

Can you share a screenshot of your model/relationships?

It seems more likely that the dates being defined are not broad enough to cover the data and likely a result of the service wanting to do everything in UTC (which is incredibly frustrating). Especially with IR.

My thinking is, if it is a UTC issue and it is affecting the dates enough to kick it back to the last day of the previous year, and your model doesn't cater for it, it could be getting a default 1899 date.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Good morning, 

 

Screenshot of the relationships below. I should note the FC_RentalBillingStartDate and FC_RentalBillingEndDate that are converted into the LineRentalDate in the DAX formula are calculated using the below two DAX formulas (basically just to fill in any blanks, if there are any in the original data).

 

The bit that I'm really struggling to understand is why it is only doing this for the "Ancillary Revenue" data rather than the "Rental Revenue", even though it is all pulling from the same table.

 

FC_RentalBillingStartDate =
IF (
    ISBLANK(PBI_RentalContractLine[RentalBillingStartDate]),
    IF (
        ISBLANK(LOOKUPVALUE(PBI_RentalContractHeader[ShipmentDate], PBI_RentalContractHeader[No], PBI_RentalContractLine[DocumentNo])),
        PBI_RentalContractLine[RequestedDeliverydate],
        LOOKUPVALUE(PBI_RentalContractHeader[ShipmentDate], PBI_RentalContractHeader[No], PBI_RentalContractLine[DocumentNo])
    ),
    PBI_RentalContractLine[RentalBillingStartDate]
)
 
 
FC_RentalBillingEndDate = IF(
PBI_RentalContractLine[FC_RentalBillingStartDate]>PBI_RentalContractLine[RentalBillingEndDate],
PBI_RentalContractLine[FC_RentalBillingStartDate],
IF
(ISBLANK(PBI_RentalContractLine[RentalBillingEndDate]),PBI_RentalContractLine[RequestedDeliveryDate],PBI_RentalContractLine[RentalBillingEndDate]))
 
jackperry61_0-1731574463197.png

 

BITomS
Continued Contributor
Continued Contributor

Hi @jackperry61, you mention you have used an incremental refresh in the service? So the 1899 date could potentially be some old data that is persistent as it won't be affected by subsequent refreshes. Have you tried republishing the full report to the service so your desktop version 'overwrites' whatever is currently in the service? Do you need an incremental refresh?

 

Otherwise, it might be good to share how your incremental refresh has been set up. It feels like this may be the problem, rather than any DAX.

Good morning,

 

Sorry it was a long day yesterday - I just mean a scheduled refresh. Every time it is uploaded to the service it looks fine, but then if I refresh the data, or it refreshes at midnight when the schedule is set, the dates revert to 31/12/1899.

 

Thanks

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors