Forum Discussion
Cumulative Revenue by Plan
- Anonymous4 years ago
Hi lboldrino ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create the following measures to get the culmulative values:
ActualPlan = VAR _curmonth = MONTH ( TODAY () ) VAR _selmonth = SELECTEDVALUE ( dim_opportunity[DeliveryDate].[MonthNo] ) VAR _values = IF ( _selmonth < _curmonth, CALCULATE ( SUM ( 'dim_opportunity'[Umsatz ProfitCenter] ) ), CALCULATE ( SUM ( 'dim_opportunity'[Weighted Position] ) ) ) RETURN _valuesTemp = SUMX ( FILTER ( ALLSELECTED ( 'dim_opportunity' ), 'dim_opportunity'[ProfitCenter] = SELECTEDVALUE ( 'dim_opportunity'[ProfitCenter] ) && 'dim_opportunity'[DeliveryDate].[Year] = SELECTEDVALUE ( 'dim_opportunity'[DeliveryDate].[Year] ) && 'dim_opportunity'[DeliveryDate].[MonthNo] <= SELECTEDVALUE ( 'dim_opportunity'[DeliveryDate].[MonthNo] ) ), [ActualPlan] )Cumulative Umsatz = SUMX ( VALUES ( dim_opportunity[ProfitCenter] ), [Temp] )If the above one can't help you get the desired result, please provide some sample data with Text format(exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards
Hi lboldrino ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create the following measures to get the culmulative values:
ActualPlan =
VAR _curmonth =
MONTH ( TODAY () )
VAR _selmonth =
SELECTEDVALUE ( dim_opportunity[DeliveryDate].[MonthNo] )
VAR _values =
IF (
_selmonth < _curmonth,
CALCULATE ( SUM ( 'dim_opportunity'[Umsatz ProfitCenter] ) ),
CALCULATE ( SUM ( 'dim_opportunity'[Weighted Position] ) )
)
RETURN
_valuesTemp =
SUMX (
FILTER (
ALLSELECTED ( 'dim_opportunity' ),
'dim_opportunity'[ProfitCenter]
= SELECTEDVALUE ( 'dim_opportunity'[ProfitCenter] )
&& 'dim_opportunity'[DeliveryDate].[Year]
= SELECTEDVALUE ( 'dim_opportunity'[DeliveryDate].[Year] )
&& 'dim_opportunity'[DeliveryDate].[MonthNo]
<= SELECTEDVALUE ( 'dim_opportunity'[DeliveryDate].[MonthNo] )
),
[ActualPlan]
)Cumulative Umsatz = SUMX ( VALUES ( dim_opportunity[ProfitCenter] ), [Temp] )
If the above one can't help you get the desired result, please provide some sample data with Text format(exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards