Forum Discussion
RobbeVL
Impactful Individual
9 years agoCreating Evolution %
Hi all, I created a matrix with some data of the amount of deliveries a partner receives per week. I'd like to add the evolution per week to the matrix, how can I do this? (visually i'd add a co...
- 9 years ago
Hi RobbeVL,
Based on my test, the formula below should work in your scenario.
Evolution/Week = VAR currentYear = MAX ( DimDate[CalendarYear] ) VAR currentWeek = MAX ( 'DimDate'[Weeknumber] ) RETURN DIVIDE ( [#Parcels] - CALCULATE ( [#Parcels], FILTER ( ALLEXCEPT ( General_Deliveries, General_Deliveries[BRAND] ), RELATED ( 'DimDate'[CalendarYear] ) = currentYear && RELATED ( 'Dimdate'[Weeknumber] ) = currentWeek - 1 ) ), CALCULATE ( [#Parcels], FILTER ( ALLEXCEPT ( General_Deliveries, General_Deliveries[BRAND] ), RELATED ( 'DimDate'[CalendarYear] ) = currentYear && RELATED ( 'Dimdate'[Weeknumber] ) = currentWeek - 1 ) ) )Here is the modified pbix file for your reference. :smileyhappy:
Regards
RobbeVL
Impactful Individual
9 years agoHi there v-ljerr-msft
Thanks for the swift replies again!
In the dropbox link below you'll find a masked file. (tab "Key Account Overview")
https://www.dropbox.com/s/1ug0ocgdg9lvy63/DatamodelParcify_CSV_RobbeUpload.pbix?dl=0
Please have a look! :)
Regards,
v-ljerr-msft
Microsoft Employee
9 years agoHi RobbeVL,
Based on my test, the formula below should work in your scenario.
Evolution/Week =
VAR currentYear =
MAX ( DimDate[CalendarYear] )
VAR currentWeek =
MAX ( 'DimDate'[Weeknumber] )
RETURN
DIVIDE (
[#Parcels]
- CALCULATE (
[#Parcels],
FILTER (
ALLEXCEPT ( General_Deliveries, General_Deliveries[BRAND] ),
RELATED ( 'DimDate'[CalendarYear] ) = currentYear
&& RELATED ( 'Dimdate'[Weeknumber] )
= currentWeek - 1
)
),
CALCULATE (
[#Parcels],
FILTER (
ALLEXCEPT ( General_Deliveries, General_Deliveries[BRAND] ),
RELATED ( 'DimDate'[CalendarYear] ) = currentYear
&& RELATED ( 'Dimdate'[Weeknumber] )
= currentWeek - 1
)
)
)
Here is the modified pbix file for your reference. :smileyhappy:
Regards
- RobbeVL9 years ago
Impactful Individual
Awsome! Thank you !