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

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

Reply
Avivek
Post Partisan
Post Partisan

Date column is not being converted properly while importing from an excel

I am facing 2 issues:

1. Firstly, when I am connecting the power bi model to an excel file, the date column is showing issues. The date in the excel is text format and when bought in power bi it takes month as day and day as month. Even when i change the date format, it doesn't help much.

Avivek_0-1694520571699.png

So if you see in the above image, the same posting date if taken as a hierarchy shows day as month and month as day. How can we fix this without doing any transformation in the excel.

2. Secondly, because of this issue i am unable to calculate my current week sales. How do we calculate current week sales?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Avivek ,

 

The date format is related with your location you set up. You can use "Using Locale..." to fix it.

Below is an example, my default format for dates is MM/DD/YYYY. So DD/MM/YYYY dates are imported in and text is displayed.

vstephenmsft_0-1694759729597.png

If your DD does not exceed 12 days, then the import may detect the date as MM/DD/YYYY, i.e. the month and days are reversed.

vstephenmsft_2-1694759966429.png

For the column you want to reformat the date, right-click and select Using Locale...

vstephenmsft_1-1694759742766.png

Select the Data Type as Date and Locale as the location you want. Here I selected English( United Kingdom) which date format is DD/MM/YYYY. You can see the sample input values for reference.

vstephenmsft_3-1694760039623.png

vstephenmsft_5-1694760239144.png

Note that before using Using Locale, restore the date to text format before working with it.

 

For calcualting the current sales, you can try creating the following measure.

Current Week Sales = CALCULATE(SUM('Table (2)'[Value]), DATESBETWEEN('Table (2)'[Date], TODAY() - WEEKDAY(TODAY(), 2) + 1, TODAY()))

vstephenmsft_6-1694760708783.png

 

 

If you want to return the total for all rows in the table visual. You can modify as

Current Week Sales = CALCULATE(SUM('Table (2)'[Value]), DATESBETWEEN('Table (2)'[Date], TODAY() - WEEKDAY(TODAY(), 2) + 1, TODAY()),ALLSELECTED('Table (2)'))

vstephenmsft_7-1694760766059.png

 

 

Best Regards,

Stephen Tao

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @Avivek ,

 

The date format is related with your location you set up. You can use "Using Locale..." to fix it.

Below is an example, my default format for dates is MM/DD/YYYY. So DD/MM/YYYY dates are imported in and text is displayed.

vstephenmsft_0-1694759729597.png

If your DD does not exceed 12 days, then the import may detect the date as MM/DD/YYYY, i.e. the month and days are reversed.

vstephenmsft_2-1694759966429.png

For the column you want to reformat the date, right-click and select Using Locale...

vstephenmsft_1-1694759742766.png

Select the Data Type as Date and Locale as the location you want. Here I selected English( United Kingdom) which date format is DD/MM/YYYY. You can see the sample input values for reference.

vstephenmsft_3-1694760039623.png

vstephenmsft_5-1694760239144.png

Note that before using Using Locale, restore the date to text format before working with it.

 

For calcualting the current sales, you can try creating the following measure.

Current Week Sales = CALCULATE(SUM('Table (2)'[Value]), DATESBETWEEN('Table (2)'[Date], TODAY() - WEEKDAY(TODAY(), 2) + 1, TODAY()))

vstephenmsft_6-1694760708783.png

 

 

If you want to return the total for all rows in the table visual. You can modify as

Current Week Sales = CALCULATE(SUM('Table (2)'[Value]), DATESBETWEEN('Table (2)'[Date], TODAY() - WEEKDAY(TODAY(), 2) + 1, TODAY()),ALLSELECTED('Table (2)'))

vstephenmsft_7-1694760766059.png

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.