Forum Discussion
Previous not blank value
Hi all,
I have the following matrix:
| No_ | 2015 | 2016 | 2017 | 2018 | 2019 |
| 1001 | 14,90 | 0,00 | 0,00 | 7,00 | 0,00 |
| 1002 | 103,55 | 102,20 | 0,00 | 81,15 | 0,00 |
| 1003 | 200,69 | 172,25 | 105,45 | 199,70 | 168,30 |
The measure that caluculates the values looks like this:
m_maxBestand = IF(ISBLANK(MAX(_PBI_Dispo_InventoryDev[cumulativBestand]));0;MAX(_PBI_Dispo_InventoryDev[cumulativBestand]))
The table [_PBI_Dispo_InventoryDev] looks as follows (filtered on '1002' for a better overview):
| No_ | PostingDate | SumPerDay | GroupIndex | cumulativBestand | yDatePeriod |
| 1002 | 01.01.2015 | 23,65 | 1 | 23,65 | 2015 |
| 1002 | 12.03.2015 | -6,5 | 2 | 17,15 | 2015 |
| 1002 | 26.08.2015 | 86,4 | 3 | 103,55 | 2015 |
| 1002 | 16.09.2015 | -1 | 4 | 102,55 | 2015 |
| 1002 | 17.05.2016 | -0,35 | 5 | 102,2 | 2016 |
| 1002 | 18.05.2016 | -2,55 | 6 | 99,65 | 2016 |
| 1002 | 05.08.2016 | -3,1 | 7 | 96,55 | 2016 |
| 1002 | 08.08.2016 | -8,8 | 8 | 87,75 | 2016 |
| 1002 | 22.02.2018 | -6,6 | 9 | 81,15 | 2018 |
What I want to achieve is that my measures shows the latest available value instead of 0 so that the matrix looks like the following:
| No_ | 2015 | 2016 | 2017 | 2018 | 2019 |
| 1001 | 14,90 | 14,90 | 14,90 | 7,00 | 7,00 |
| 1002 | 103,55 | 102,20 | 102,20 | 81,15 | 81,15 |
| 1003 | 200,69 | 172,25 | 105,45 | 199,70 | 168,30 |
Is this possible and if so - how?
Thanks!
10 Replies
- amitchandakSuper User
Try like
Cumm = CALCULATE(SUM(Table[SumPerDay]),filter(table,table[No_] <=maxx(table,date[No_]) && table[yDatePeriod] =max(table[yDatePeriod]) ))- JanBauerFrequent Visitor
Hi amitchandak,
can you explain the DAX formular?
I'm not quite sure if you understood my enquiry correctly.
Thanks.
- amitchandakSuper User
JanBauer ,
Please find solution at https://www.dropbox.com/s/q5hxd2ztdca48nq/Previous%20not%20blank%20value.pbix?dl=0
- v-lionel-msftCommunity Support
Hi JanBauer ,
Is this what you want?
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.