Forum Discussion
Caluculation Quote Between Dates and Consider Product
- 9 years ago
Perfect,
guess this measure will provide what you are looking for
lastvalue = CALCULATE( LASTNONBLANK(Cotacao[Cot], sum(Cotacao[Cot]) ) )
a slight variation will provide the last date
lastdate = CALCULATE( LASTNONBLANK('Cotacao'[Data], sum(Cotacao[Cot]) ) )Hope this helps
And another question, does your model just contain that one table you mentioned or do you also use a separate date table?
This is the Table with Values
And i Have a Calendar Table.
The measure must calculate the last [Cot] of each [Ativo] according to the Date selected in the Dashboard.
If it's a Month or Year or All, you should look for the last [Cot].
If there is no [Cot] for the Data and [Asset] selected, you should search for the last one.
- TomMartens9 years ago
Super User
Hey,
thanks for the sharing a screenshot, maybe you will find some time to provide sample data that can be easily recreated by the people here in the community (downloadable (pbix, xlsx or csv), this will safe me a lot of time during the weekend and prevents issues with insufficient sample data.
Thanks
- fjjohann9 years agoFrequent Visitor
- TomMartens9 years ago
Super User
Perfect,
guess this measure will provide what you are looking for
lastvalue = CALCULATE( LASTNONBLANK(Cotacao[Cot], sum(Cotacao[Cot]) ) )
a slight variation will provide the last date
lastdate = CALCULATE( LASTNONBLANK('Cotacao'[Data], sum(Cotacao[Cot]) ) )Hope this helps