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_
Naturally, it's a manually added table (where Maand is the month number and date the first day of the month date value)
Hi again
Verwachtte vooruitgang =
SELECTEDVALUE(
'Voortgang %'[Verwachte voortgang],
FILTER(
ALL('Voortgang %'),
'Voortgang %'[Maand]= MONTH(TODAY())
)
)
Need to be careful because if you have more than 2 year it will return a error.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC
- onurbmiguel_4 years ago
Power Participant
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- JesseV4 years agoFrequent Visitor
Hey Onurbmiguel,
I appreciate the effort! Unfortunately I'm still getting the same errorI 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_