cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Associate a value to a specific date

Hi everyone,

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
Community Support

Hi,

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

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:

Here is my test pbix file:

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.

Thanks,

Community Support

Hi,

Thanks!

Best Regards,

Giotto Zhi

Anonymous
Not applicable

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,
Community Support

Hi,

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

Best Regards,

Giotto

Anonymous
Not applicable

Hi,

Tks,

Super User

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors