Hi Team,
I have a requirement in which i need to update the Current Month value to Upcoming Month values that are showing null.For Example in the Below Scrrenshot the Sales value in Current month 2018/09 should get updated to 2018/10, 2018/11, 2018/12
Please find the Screenshot Below. Any Help would be appreciated. 🙂
Solved! Go to Solution.
Hi @Prodosh,
We could use a measure like below. If you need the exact formula, please provide a dummy sample.
Measure 7 = VAR lastDateHasSales = CALCULATE ( LASTNONBLANK ( 'Calendar'[Date], CALCULATE ( SUM ( FactSales[SalesQuantity] ) ) ), ALL ( 'Calendar' ) ) RETURN IF ( ISBLANK ( SUM ( FactSales[SalesQuantity] ) ), CALCULATE ( SUM ( FactSales[SalesQuantity] ), FILTER ( ALL ( 'Calendar' ), YEAR ( 'Calendar'[Date] ) = YEAR ( lastDateHasSales ) && MONTH ( 'Calendar'[Date] ) = MONTH ( lastDateHasSales ) ) ), SUM ( FactSales[SalesQuantity] ) )
Best Regards,
Dale
So, are you saying that those last 3 values should show the value for 2018/09 (441,600.11) instead of blank?
Proud to be a Datanaut!
yes
Hi @Prodosh,
We could use a measure like below. If you need the exact formula, please provide a dummy sample.
Measure 7 = VAR lastDateHasSales = CALCULATE ( LASTNONBLANK ( 'Calendar'[Date], CALCULATE ( SUM ( FactSales[SalesQuantity] ) ) ), ALL ( 'Calendar' ) ) RETURN IF ( ISBLANK ( SUM ( FactSales[SalesQuantity] ) ), CALCULATE ( SUM ( FactSales[SalesQuantity] ), FILTER ( ALL ( 'Calendar' ), YEAR ( 'Calendar'[Date] ) = YEAR ( lastDateHasSales ) && MONTH ( 'Calendar'[Date] ) = MONTH ( lastDateHasSales ) ) ), SUM ( FactSales[SalesQuantity] ) )
Best Regards,
Dale
Thanks for your Reply. this logic is working fine.
User | Count |
---|---|
122 | |
77 | |
71 | |
68 | |
67 |
User | Count |
---|---|
105 | |
53 | |
51 | |
48 | |
48 |