Forum Discussion

HenryJS's avatar
HenryJS
Post Prodigy
6 years ago
Solved

Matrix: If statement return column

Hi all,

 

I have the  two tables 'Placements (2)' and a date table visualised in the below matrix with the measure:

 

Timesheet Y/N = IF(SELECTEDVALUE('Placements (2)'[PlacementStartDate])<= MAX('DaysAndWeeks'[Date]) && SELECTEDVALUE('Placements (2)'[PlacementEndDate]) >= MAX('DaysAndWeeks'[Date]), "Yes","")
 
 

Instead of the "Yes" is it possible to RETURN the 'Placements(2)'[PayRate] Column?

 

This would then visualise the figure instead of the "Yes" and would be totalled at the end of the columns.

 
 
 
 
Placements (2) Table:
 
CandidateNamePlacementStartDatePlacementEndDateRate1PayRateRate1ChargeRate
Jayden 06/07/2020 01:0029/11/2020 00:0021.1731.73
Ian 01/07/2020 01:0030/09/2020 01:003033.6
Michael 07/04/2020 01:00   
Tim 07/04/2020 01:0003/05/2020 01:002125
Nicolae 06/04/2020 01:0003/05/2020 01:001718.87
Marius 06/04/2020 01:0003/05/2020 01:001516.65
Max 01/04/2020 01:0027/11/2020 00:00323.75365.84
 
  • HenryJS ,

    Try like


    IF(SELECTEDVALUE('Placements (2)'[PlacementStartDate])<= MAX('DaysAndWeeks'[Date]) && SELECTEDVALUE('Placements (2)'[PlacementEndDate]) >= MAX('DaysAndWeeks'[Date]), max('Placements(2)'[PayRate] ),blank())

4 Replies

  • HenryJS ,

    Try like


    IF(SELECTEDVALUE('Placements (2)'[PlacementStartDate])<= MAX('DaysAndWeeks'[Date]) && SELECTEDVALUE('Placements (2)'[PlacementEndDate]) >= MAX('DaysAndWeeks'[Date]), max('Placements(2)'[PayRate] ),blank())

    • HenryJS's avatar
      HenryJS
      Post Prodigy

      amitchandak thank you

       

      The Total on the right hand side isn't functioning?

       

      Also it seems to have filtered down the 'CandidateName' to a lesser amount. Is this because if there is no 'Pay Rate' they won't be shown?

       

      Cheers