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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Unable to get same date format for two dates.

Hi,

I have two tables which has a date column in each of them. T1[Rush_Date] and T2[Calendar_Date].

Columns:

T1[Rush_Date] = ({7/2/2018 7:58:00 AM;      8/5/2018 4:50:00 PM;       5/5/2018 4:45:45 Am,.........................})

T2[Calendar_Date]= ({Saturday, January 1, 2018;    Sunday, September 5, 2018;       Tuesday, November 7, 2018      ;............ })

 

I want count of Rush_date according to the selected date in Calendar Date.

I have changed date type and format of both the columns to Date and Format: 3/14/2001 (M/d/yyyy) through Modelling tab.

 

But still when I select any date, I am seeing 0 value for Rush_Date.

 

I appreciate any help on this.

 

Thanks,

Shikha

 

 

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

I made one sample for your reference. Here we can create a measure to achieve your goal.

 

Measure = var mindate = CALCULATE(MIN('T2'[Date]),ALLSELECTED(T2[Date]))
var maxdate = CALCULATE(MAX('T2'[Date]),ALLSELECTED(T2[Date]))
return
CALCULATE(COUNT(Table1[Rush_Date]),FILTER(ALL(Table1),mindate<=Table1[Rush_Date] && maxdate>=Table1[Rush_Date]))

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Anonymous
Not applicable

Thanks for your response. I will try your solution in some other requirement :).

For this one, I made a SQL query and pulling data from SQL Server.

 

I appreciate your efforts, thanks a ton again.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

I made one sample for your reference. Here we can create a measure to achieve your goal.

 

Measure = var mindate = CALCULATE(MIN('T2'[Date]),ALLSELECTED(T2[Date]))
var maxdate = CALCULATE(MAX('T2'[Date]),ALLSELECTED(T2[Date]))
return
CALCULATE(COUNT(Table1[Rush_Date]),FILTER(ALL(Table1),mindate<=Table1[Rush_Date] && maxdate>=Table1[Rush_Date]))

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thanks for your response. I will try your solution in some other requirement :).

For this one, I made a SQL query and pulling data from SQL Server.

 

I appreciate your efforts, thanks a ton again.

Hi @Anonymous,

 

Kindly mark your answer as a solution to close the case please. Thanks in advance.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.