Forum Discussion
Akshaymanjunath
1 year agoFrequent Visitor
Dynamic Percentage change in KPI
I need to create a growth rate visual in KPI When a particular time period is selected in the global filter date, it should display data comparing the previous period This should work dynamically a...
Uzi2019
Community Champion
1 year ago
You can try below dax for dynamic comparison:
LastPeriod =
VAR selectedDays =
CALCULATE ( COUNT ( Calendar[Date] ), ALLSELECTED ( Calendar[Date] ) )
VAR minDate =
CALCULATE ( MIN ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
RETURN
CALCULATE (
SUM (SalesTable[SalesColumn] ),
DATESINPERIOD ( 'Calendar'[Date], minDate - 1, - selectedDays, DAY )
)
or try below video for better understanding
https://www.youtube.com/watch?v=Wwo-tY0B9pY
https://www.youtube.com/watch?v=Wwo-tY0B9pY
I hope this might help you to solve your probem.