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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
Super User
Super User

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.