Forum Discussion

stefan2297's avatar
stefan2297
Frequent Visitor
3 years ago

Modify a formula result using a date slicer

Hello guys,

 

I have a long formula that looks like this: Progress = calculate((SUM('Device - Installation'[QTT Installed])*0.85 + SUM('Device -Labell'[QTT Labell])*0.05 + SUM('Device -Test'[QTT Tested])*0.1)/SUM('Device - W[QTT Total]))

 

This formula calculate the percetange of completation and i want to make it to be able to see actual completation at a specific date.

I'm using a date slicer to do that.

 

I've made these in the past using USERELATIONSHIP but this time i don't know how to make it right. I tried a lot but without success. 

 

Thank you for your help!

 

Best regards,

S.

4 Replies

  • bhelou's avatar
    bhelou
    Icon for Responsive Resident rankResponsive Resident

    Hello :  try to use filter function : 

    Progress =
    VAR SelectedDate = MAX('Date'[Date])
    RETURN
    CALCULATE(
    (SUM('Device - Installation'[QTT Installed])*0.85 + SUM('Device -Labell'[QTT Labell])*0.05 + SUM('Device -Test'[QTT Tested])*0.1)/SUM('Device - W[QTT Total]),
    USERELATIONSHIP('Date'[Date], 'Device - Installation'[Installation Date]),
    USERELATIONSHIP('Date'[Date], 'Device -Labell'[Labell Date]),
    USERELATIONSHIP('Date'[Date], 'Device -Test'[Test Date]),
    FILTER('Date', 'Date'[Date] = SelectedDate)
    )



    • stefan2297's avatar
      stefan2297
      Frequent Visitor

      I still have this error: USERELANTIONSHIP function can only use two columns references participating in relantionship.

      • bhelou's avatar
        bhelou
        Icon for Responsive Resident rankResponsive Resident

        can you upload a sample of the dataset ? and provide samples in excel to see the final figure for it