Forum Discussion
Anonymous
1 year agoNot applicable
Dynamic Percentage
Hello Everyone, I need to calculate the percentage change in price based on the selected date range in a slicer. For example, if I select the range from 2014 to 2016 for Code A, the percentage cha...
Anonymous
1 year agoNot applicable
Hello Rajendra,
Thank you for you response.
I tried you suggested measure but its still not working.
its showing 0% at all dates.
rajendraongole1
1 year agoSuper User
Hi Anonymous - I am not able to download the pbix file from drive . you can please share pbix file in right way?
can you please try the below modified logic
Percentage Change =
VAR FirstSelectedDate =
CALCULATE(
MIN('Calendar'[Date]),
ALLSELECTED('Calendar')
)
VAR BaseValue =
CALCULATE(
SUM(Sheet1[Price]),
'Calendar'[Date] = FirstSelectedDate
)
VAR CurrentValue =
SUM(Sheet1[Price])
VAR Result =
DIVIDE(CurrentValue - BaseValue, BaseValue, 0)
RETURN
IF (
NOT (ISBLANK(BaseValue)),
Result,
BLANK()
)
- Anonymous1 year agoNot applicableSpoilerHi rajendraongole1
I tried given DAX but still its working.
I am trying to attached file but it working.
My Drive - Google Drive can try on this link again. i have upload excel file also. and the sceenshot of how its looking in my file.