Forum Discussion
alecsonline
Helper I
8 years agoDifficulties using VAR with a simple measure
Hi all, I am having not the expected result with this: this formula works: booked = var readingdatevar=[maxreadingdate] return CALCULATE(SUM(bookings[roomnumbers]);FILTER(booking[reservat...
- 8 years ago
VARIABLES are just a store of value. They do not store Expressions. So They are not dynamic like MEASURES
So Once you define a VARIABLE it is stored as a VALUE
So you are evaluating a fixed number when you are evaluating a VARIABLEi.e. something like this
CALCULATE(150000;FILTER(bookings;booking[reservationdate]<readingdatevar))
Anonymous
8 years agoNot applicable
alecsonline
Helper I
8 years agoThank you Ravik for your gift! It is true it works, but not when I modify it for my needings... my fault because I would not even be able to write them in a clear way. But your way to use the VAR is very useful and it is really a great help!
Alessandro