Forum Discussion

Typhoon74's avatar
Typhoon74
Icon for Helper I rankHelper I
4 years ago
Solved

Measure with USERELATIONSHIP on DATES not working constanly

Hi everyone,
I do have an issue where a sum is not calculated constantly when using my measure. Within a period it is working on some line items and on others, it isn't. Does anyone have an idea why?

 

This is the current report result for the time period of March 2022.

The red highlighted entries are not getting calculated by the measure and the green ones are getting calculated ðŸ¤” and I do not know why?

 

The measures are defined as follows

 

The data model is defined as follows

  • I did find the problem.

    The FINISHDATEPLAN column is a calculated column based on STARTDATEPLAN + DURATION and the duration was causing the issue.

    The duration column is having values of 2.33 or 1.67 etc. and the column was set as a decimal data type and that couldn't be calculated.
    I changed the data type now to "whole number" and the issue is gone.

3 Replies

  • Typhoon74 ,In such case you should use date from date table in visual not start and finish date. We are doing this to get the common date

     

    referhttps://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

    • Typhoon74's avatar
      Typhoon74
      Icon for Helper I rankHelper I

      Hi amitchandak,
      I know that, I just added these columns to show that all the data are existing and within the same period.

      My question is why are the measures not working constantly?
      See the first 6 rows why are the measure column M PlanCost 100% and M PlanCost 80% on some rows having a value and on other rows not?

       

       

  • I did find the problem.

    The FINISHDATEPLAN column is a calculated column based on STARTDATEPLAN + DURATION and the duration was causing the issue.

    The duration column is having values of 2.33 or 1.67 etc. and the column was set as a decimal data type and that couldn't be calculated.
    I changed the data type now to "whole number" and the issue is gone.