Forum Discussion

Islam's avatar
Islam
Icon for Helper V rankHelper V
5 years ago

need help to get selected row offset value

hello every one 

A great helper here provided me a measure to get calculation

but the problem with it lays in following variable declaration

VAR MinDate =

MAXX( ALLSELECTED ( dtblassignmentDec[تاريخ تنفيذ القرار] );dtblassignmentDec[تاريخ تنفيذ القرار] )

it gives me the minimum date value which i don't need precisely

what i need is as following 

for each row in thefact table i wanna return the equivalent date value in the dimension table based on the typed AssigningDecID in select row in fact table not the minimum value

i'm using power pivot in excel so i can't really upload a sample file right here but if any one knows how to upload the master excel file here without losing the data in all excel fact and dimension table let me know 

5 Replies

    • Islam's avatar
      Islam
      Icon for Helper V rankHelper V

      ok sir i'll watch videos and try to upload a sample

    • Islam's avatar
      Islam
      Icon for Helper V rankHelper V

      thanks sir for help 

      i attached a sample of pbix file

      at the measure wage growth it's supposed to calculate the regular adds rate based on some conditions and the main condition is that there is difference in dates between assigning date and regular add date equals year at least but in a comulative way

      assigning date for each employee should be the base date for him so the first next regular add will be compared in date with assigning date then the next regular add will be compared in date with the previous regular add and so on 

      so in my example employeeID 1 should get rgular add for 2015 not employee number 2

      another problem is that i wanna visualize only employee who appeared in FTransaction table not all employee in basic emp info dimension table

      Sample File 

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi Islam ,

     

    Does it look like this?

    If not, please provide a description of your calculation logic and expected output. I don't quite understand your data model.

     

    Best regards,
    Lionel Chen

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

     

    • Islam's avatar
      Islam
      Icon for Helper V rankHelper V

      thx sir for your help i appreciate it but unfortunately this is not actually what i need

      employee number 2 only is the one should get 1/7/2015 regular add 

      i wanna show only the employees who have a value in the fact table i mean employee number 1 and 2

      here is a sample other more detailed file 

      Sample