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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vpcontrol
Regular Visitor

Date between two dates

Hello everyone,

 

I have a problem with a calendar. I need help.

I have a table with two dates. 

First date

02/01/2019

Last date

02/03/2019

 

I want to draw days between DATE INICIO and DATE FIN in a visual calendar. In this moment visual calendar only show DATE INICIO. 

I need a visual calendar with days 3, 4 , 5 y 6 drawn. Is it possible with dax?

 

Thanks

 

 

 

 

Captura.PNG

 

 

 

 

1 ACCEPTED SOLUTION

Hi @vpcontrol ,

I created a sample to implement it that may help you.

  • Create a calendar table. And there is no relationships between the tables.
Table 2 = CALENDARAUTO()

1.PNG

  • Create a measure.
Measure = 
var min_start =  MIN('Table'[Start ])
var max_fin =MAX('Table'[Finish])
return
IF( MAX('Table 2'[Date])>= min_start && MAX('Table 2'[Date]) <= max_fin, 1,0)

2.PNG

I attached my sample that you can download and check if it is what you want.

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
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

3 REPLIES 3
amitchandak
Super User
Super User

I am not sure I got it completely. But please try.

You can join date dimension with both the dates and use them is the formula as per need using use relation.

 

This is not exact example but very similar.

https://community.powerbi.com/t5/Desktop/DATE-RANGE-SLICERS-TO-COMPARE-NETSALES-OF-A-DATE-RANGE/td-p...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Thanks for you answer, but I need shows dates between two date (star and finish) for a events.

 

STAR DATE EVENT

03 October

 

FINISH DATE EVENT

06 October

 

I need to show in visual calendar, days between 03 October - 06 October, because days 3, 4 , 5 and 6 October is the period of celebration this event.

 

Thanks

 

InkedCaptura_LI.jpg

Hi @vpcontrol ,

I created a sample to implement it that may help you.

  • Create a calendar table. And there is no relationships between the tables.
Table 2 = CALENDARAUTO()

1.PNG

  • Create a measure.
Measure = 
var min_start =  MIN('Table'[Start ])
var max_fin =MAX('Table'[Finish])
return
IF( MAX('Table 2'[Date])>= min_start && MAX('Table 2'[Date]) <= max_fin, 1,0)

2.PNG

I attached my sample that you can download and check if it is what you want.

 

Best Regards,

Xue Ding

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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