Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
HenryJS
Post Prodigy
Post Prodigy

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.

 
 
Capture1.JPG
 
 
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
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@HenryJS ,

Try like


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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@HenryJS ,

Try like


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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@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

 

Capture1.JPG

 

 

@HenryJS ,

Please find the attached file after signature

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

Thanks for your help so far - that's worked.

 

I am now having issues with the 'Total' on the rows.

 

It is not Totalling correctly where I have put two x's.

 

The grand total is maxxing out at 1,400,000 and the sub totals are only showing max not the actualy total.

 

Can privately share data if you would like?

 

Thanks

 

 

Capture222.JPG

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.