Forum Discussion

samoberoi's avatar
samoberoi
Helper III
2 years ago
Solved

Time Intelligence not working

Hi all, I am using Userelationship function in my DAX  below & it seems to be working fine to sum up the values on column A from Table_Eng on the condition of if the column B values from the table T...
  • rajendraongole1's avatar
    2 years ago

    Hi samoberoi - Can you try the below measure:

     

    TotalHoursWithinDateRange =
    CALCULATE(
    SUM('Table_Eng'[Column A]),
    USERELATIONSHIP('Table_Comm'[Id], 'Table_Eng'[Id]),
    DATESBETWEEN(
    'Dates'[Date],
    DATE(YEAR(TODAY()), MONTH(TODAY()), 1), -- Start of current month
    EOMONTH(TODAY(), 0) -- End of current month
    )
    ) / 7.5 -- Convert hours to days

     

     

    Here , i have highlighted the changes. Pleas use the above and let know.

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,

    Thanks fot the solution rajendraongole1  privided and i want to offer some more information for user to refer to.

    hello samoberoi , you can try the following measure

    Measure =
    VAR a =
        CALCULATE (
            SUM ( Table_Eng[Column A] ),
            USERELATIONSHIP ( Table_Comm[Id], Table_Eng[Id] ),
            DATESBETWEEN (
                Dates[Date],
                EOMONTH ( TODAY (), -1 ) + 1,
                EOMONTH ( TODAY (), 0 )
            )
        )
    RETURN
        DIVIDE ( a, 7.5 )
    

     

    Best Regards!

    Yolo Zhu

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