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

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

Reply
Anonymous
Not applicable

Associate a value to a specific date

Hi everyone,

 

Please I need your help,

TIME.PNG

TIME2.PNG

I'm calculating the time past by day, on this example the FRE_NextTime finished on the next day, then i calculate MINUIT that mean from FRE_Time to midnight, 115.47 minuts for February 8, and did the same for the next day of February 9, MATIN is the rest from FRE_NextTime back to midnight, the MATIN, 363.73 min belongs to the next day February 9.

 

I need to associate the value of MATIN to the right date, in this case FRE_NextTime - Copier.

I tried this:

 

TIME = IF(TBL_RESULTS[FRE_Time - LIAISON]<>TBL_RESULTS[FRE_NextTime - Copier];CALCULATE(SUM(TBL_RESULTS[MATIN]);NEXTDAY(TBL_RESULTS[FRE_Time - LIAISON])).

 

Thanks a lot,

7 REPLIES 7
v-gizhi-msft
Community Support
Community Support

Hi,

 

According to your description, i create a sample to test:

20.PNG

Then try these two columns:

MINUIT = DATEDIFF('Table'[FRE_Time],'Table'[FRE_Time-LIAISON]+TIME(0,0,0)+1,SECOND)/60
MATIN = DATEDIFF('Table'[FRE_NextTime-Copier]+'Table'[FRE_NextTime],'Table'[FRE_NextTime-Copier]+TIME(0,0,0)+1,SECOND)/60

The result shows:

21.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

But i still need to associate for example, the MATIN's value (1076,28) to the right date (February 9) when i filter by date.

 

 

the problem here, is when I select a date ( February 😎 i have to see all the MINUIT's value and for  ( February 9) all the MATIN's value because of is after the midnight and it belong to the next day of 8.

cc.PNGcc1.PNG

Thanks,

 

Hi,

 

I am still confused about your requirement.

Could you please explain more about your requirement and expected result for me to help you further.

Thanks!

Expect your reply!

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

ab.PNG

Here is the real data,

My expected result appears on TIME column with those conditions:

if FRE_NextTime - Copier <> FRE_Time - LIAISON then :

 

MINUIT: 

IF(TBL_RESULTS[FRE_Time - LIAISON]<>TBL_RESULTS[FRE_NextTime - Copier];HOUR(24)-TBL_RESULTS[FRE_Time - Copier]

MATIN:

IF(TBL_RESULTS[FRE_Time - LIAISON]<>TBL_RESULTS[FRE_NextTime - Copier];(TBL_RESULTS[FRE_NextTime]-HOUR(24)
 
So:
I want to: TIME = if FRE_NextTime - Copier <> FRE_Time - LIAISON ; associate every MINUIT's value to FRE_TIME - LIAISON OR/AND associate every MATIN's value to FRE_NextTime - Copier
 
Thanks a lot,

Hi,

 

According to your posted screenshot, please try this column:

Time =
IF (
    'TBL_RESULTS'[MINUIT] <> BLANK (),
    'TBL_RESULTS'[MINUIT],
    'TBL_RESULTS'[CYCLE]
)

 

Best Regards,

Giotto

Anonymous
Not applicable

Hi,

 

What about MATIN status?

 

Tks,

Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors