Forum Discussion
measure that returns another column value based on the current month
- 4 years ago
I ended up cracking it by adding Calculate before the whole thing:
Verwachtte vooruitgang = CALCULATE(SELECTEDVALUE('Voortgang %'[Verwachte voortgang]), Filter('Voortgang %','Voortgang %'[Maand] = MONTH(TODAY())) )
Thanks a ton for your assistance onurbmiguel_
if you have 2 or more year you can try:
Verwachtte vooruitgang =
SELECTEDVALUE(
'Voortgang %'[Verwachte voortgang],
FILTER(
ALL('Voortgang %'),
'Voortgang %'[Datum] = date( year(TODAY()) , MONTH(TODAY()) , 1 )
)
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC
Hey Onurbmiguel,
I appreciate the effort! Unfortunately I'm still getting the same error
I attempted to filter on the Month value (outside of the date column) , this had the same error as a result. (It's complaining about multible collumns not being converted, only a scalair value can be (whatever that may be).
I'm starting to think my approach to using SELECTEDVALUE is wrong (after reading https://docs.microsoft.com/en-gb/dax/selectedvalue-function )
Since I don't want to filter on the 'Voortgang %'[Verwachte voortgang] collumn but on the Month collumn.
As in the example; every month will have 1 row with only 1 value.
- JesseV4 years agoFrequent Visitor
I ended up cracking it by adding Calculate before the whole thing:
Verwachtte vooruitgang = CALCULATE(SELECTEDVALUE('Voortgang %'[Verwachte voortgang]), Filter('Voortgang %','Voortgang %'[Maand] = MONTH(TODAY())) )
Thanks a ton for your assistance onurbmiguel_