Forum Discussion
Measure to return same value over multiple rows in table visual
- 1 year ago
This is the result I got, I have to say it was tough to get it (so thank you!)
I just left blank the end date instead of putting year 2099 for best practice (we can fix this to work also with 2099 in case you cannot remove that value)
If that is what you were looking for, here is my solution (pbix)
https://drive.google.com/drive/folders/1Rmd2KqfCMOw-N3o190NzlDjP_7psU_jV?usp=sharing
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi PowerUP200 ,
To show the same value (e.g., classification) across multiple rows for each employee and date selection, you need to calculate the value ignoring row context and just based on person and selected date.
You can use a measure like this:
SubstantivePlacement =
VAR selDate = SELECTEDVALUE('Date'[Date])
VAR selPerson = SELECTEDVALUE('YourTable'[Person])
RETURN
CALCULATE(
MAX('YourTable'[Classification]),
FILTER(
ALL('YourTable'),
'YourTable'[Person] = selPerson &&
'YourTable'[Placement Type] = "Substantive" &&
'YourTable'[PersonStart date] <= selDate &&
'YourTable'[End Date] >= selDate
)
)
And do the same for "Acting" by changing the placement type in the filter.