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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Date calculation

Hi

Can any one please help me on how to calculate date difference from effictive start and effective end dates in DD/MM/YYYY format to use as date hierarchy filter 

 

Effective start    Effective End      expected output

1 march 2023   31 march 2023    30 march 2023

 

 

pawwy1_0-1690795437785.png

 

 

 

5 REPLIES 5
DataVitalizer
Solution Sage
Solution Sage

Hi @Anonymous 

If you are trying to change the columns display format you can do it by selecting your columns and from Column Tools you can change Dates formats

othy_bi_1-1690798375707.png

Otherwise please provide more details in case you have a different need.

 

Did it work ?  ‌‌ Mark it as a solution to help spreading knowledge
Was this exchange helpful? A kudos 👍 would be appreciated

ryan_mayu
Super User
Super User

@Anonymous 

what's the epxected output based on the sample data you provided?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi

 

Effective start    Effective End      expected output

1 march 2023   31 march 2023    30 march 2023

Hi @Anonymous 

To reach this result add a calculated column :

othy_bi_0-1690880862241.png

expected output='MyTable'[Effective End ]-DAY('MyTable'[Effective start])

 

If you are trying to calculate the difference between Start and end date you should use this code instead

Difference= DATEDIFF('MyTable'[Effective start],'MyTable'[Effective End],DAY)


Did it work ? 👍 A kudos would be appreciated ‌‌📢 Mark it as a solution to help spreading knowledge

is the expected output one day earlier than the effective end?

 

Column = 'Table'[EffectiveEnd]-1
 
you can you go to Model view and set the date format
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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