Forum Discussion
Output needed as per Criteria
- 6 years ago
Hi, Gururajv007
I am sorry for the late reply. Based on your description, I created data to reproduce your scenario.
DateTable:
Table:
Here is the column and measure I created.
Rank = RANKX('DateTable',[Date].[Year]*100+[Date].[MonthNo],,ASC,Dense) OutputValue = IF ( MIN ( 'DateTable'[Date] ) < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + 1, 1 ), CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Actual" ), IF ( CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Plan" ) = BLANK(), CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Forecast" ), CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Plan" ) ) )Finally, you may use the visual level filter to get the Month-Year you want to display.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Need some expert advice here..Pl help.
Hi, Gururajv007
I am sorry for the late reply. Based on your description, I created data to reproduce your scenario.
DateTable:
Table:
Here is the column and measure I created.
Rank = RANKX('DateTable',[Date].[Year]*100+[Date].[MonthNo],,ASC,Dense)
OutputValue =
IF (
MIN ( 'DateTable'[Date] )
< DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + 1, 1 ),
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Actual" ),
IF (
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Plan" ) = BLANK(),
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Forecast" ),
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Purpose] = "Plan" )
)
)
Finally, you may use the visual level filter to get the Month-Year you want to display.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.