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
Anonymous
Not applicable

Delta between two dates

Hello folks, I'm trying to calculate the delta between two dates, I'm sending the The File .

Is there a better way to do it? Can anyone help?

 

Thanks!

 

ricardoinjapan_0-1706181070867.png

 

3 ACCEPTED SOLUTIONS

You need to disconnect your date tables, and use USERELATIONSHIP()

 

lbendlin_0-1706224192495.png

see attached

View solution in original post

Inbetween = CALCULATE(sum('Fact'[Sales]),DATESBETWEEN('Fact'[Date],min(CalendarFact[Date]),max(CalendarFactDest[Date])))

View solution in original post

You would add a second rule from 0 to max.  

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Amazing, I wish someday I'll be just as good!

lbendlin
Super User
Super User

Delta in what currency?  Days? Months? Years?

 

lbendlin_0-1706216090985.png

 

Anonymous
Not applicable

I'd like to see the result for this calculation

ricardoinjapan_0-1706220679081.png

 

You need to disconnect your date tables, and use USERELATIONSHIP()

 

lbendlin_0-1706224192495.png

see attached

Anonymous
Not applicable

Just as curiosity, do you think we can have the comulative sum between selected months? 🙂 Untitled.png

Inbetween = CALCULATE(sum('Fact'[Sales]),DATESBETWEEN('Fact'[Date],min(CalendarFact[Date]),max(CalendarFactDest[Date])))
Anonymous
Not applicable

Hello there, its me again, would you know how can I set a green color font whenever the value is higher than or equal to 1? Keeping the red rule. Thanks!

 

Screenshot 2024-01-28 174031.png

You would add a second rule from 0 to max.  

Anonymous
Not applicable

Nice, thanks!

ricardoinjapan_0-1706463583191.png

 

Anonymous
Not applicable

Awesome!

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.