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
Kamill11
Helper I
Helper I

displaying a list of dates with values from, to

Hi All, 
Can i do a measure or calculated column to show every date if from & to are different? 

For example: date from 1/03/22, date do 5/03/22 , other values like ID=1, Name=Absence1 etc.

I want show it like:
from 1/03/22 to 1/03/22, other values like ID=1, Name=Absence1 etc.
from 2/03/22 to 2/03/22, other values like ID=1, Name=Absence1 etc.
from 3/03/22 to 3/03/22, other values like ID=1, Name=Absence1 etc.
from 4/03/22 to 4/03/22, other values like ID=1, Name=Absence1 etc.
from 5/03/22 to 5/03/22, other values like ID=1, Name=Absence1 etc.

Kamill11_1-1645527130939.png

 

 

the table has more values, I would like the same values to be displayed for each date.
Iam geting this from DB in DirectQuery mode.  

I have also that value in line, maybe it will be helpfull ?

Kamill11_2-1645527346941.png

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Kamill11 ,

 

If you want to get all dates between the From and To Date, please create a calendar table firstly:

Calendar = CALENDAR(MIN('Table'[From]),MAX('Table'[To])) 

And then create a measure to "combine" all dates:

Measure = 
var _t= SUMMARIZE(FILTER(ALL('Calendar'[Date]),[Date]>=MAX('Table'[From]) && [Date]<=MAX('Table'[To])),'Calendar'[Date])
return CONCATENATEX(_t,[Date],",")

Output:

Eyelyn9_0-1645757762612.png

 

 

Best Regards,
Eyelyn Qin
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

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Kamill11 ,

 

If you want to get all dates between the From and To Date, please create a calendar table firstly:

Calendar = CALENDAR(MIN('Table'[From]),MAX('Table'[To])) 

And then create a measure to "combine" all dates:

Measure = 
var _t= SUMMARIZE(FILTER(ALL('Calendar'[Date]),[Date]>=MAX('Table'[From]) && [Date]<=MAX('Table'[To])),'Calendar'[Date])
return CONCATENATEX(_t,[Date],",")

Output:

Eyelyn9_0-1645757762612.png

 

 

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

amitchandak
Super User
Super User

@Kamill11 , I doubt the new column will work , You can get comma separated date date like

 

concatenatex( calendar(Table[Absence from], Table[Absense to]), [Date], " , ")

 

or

 

concatenatex( calendar(min(Table[Absence from]), max(Table[Absense to]) ), [Date], " , ")

 

Expected output is not clear, can you share and explain

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.