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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors