Forum Discussion
Why is my last quantity formula not working
- 3 years ago
rpinxt CALCULATE gets wonky with single tables sometimes. Try something like below. If that doesn't work then it is quite likely that you are running afoul of auto-exist where it doesn't even try the calculation.
LastQty Measure = VAR __Max_TS = MAXX(ALL('AVN PPS Daily_LC1510'),[lc_timestamp]) VAR __Curr_TS = MAX(''AVN PPS Daily_LC1510', [lc_timestamp]) VAR __Result = IF(__Max_TS = __Curr_TS, [Quantity], 0) RETURN __Result - 3 years ago
Greg_Deckler just to let you know that I got things working now.
As you see also your method is working.
Not entirely sure but I started over and made sure I had a pure direct query storage mode.
First I had a mixed mode because I made a Metrics table in which I stored my measures.
It is the only thing I think changed....
However I now made my %Done card with this formula :
Thanks for looking into this with me 😄
rpinxt I wonder if the original problem was that you had a composite data model and perhaps you needed a table to be in Dual Mode but it wasn't?
Not sure what that means, but could well be.
Was very mysterious to me. In the old version it would work if I would put text in the result.
But as soon as it needed to calculate or reference a measure it went blank.