Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am trying to build out a Power KPI Matrix to show trends over time, but the Sparklines aren't quite showing what I want. Whenever a day switches, it changes the color of the Sparkline to the change from the previous day to the next day, when I want it to just show the change from the first day to the most recent day.
The Percent change metric is correct in looking from the first date to the last date, so I am not sure how I would do that.
My measure to create the percent change is:
Percent Change =
VAR _MostRecentDay = CALCULATE(SUM('Table'[Balance]), FILTER(ALLEXCEPT('Table', 'Table'[Category]), [Date] = MAX('Table'[Date])))
VAR _FirstDay = CALCULATE(SUM('Table'[Balance]), FILTER(ALLEXCEPT('Table', 'Table'[Category]), [Date Rank] = 1))
RETURN
DIVIDE( (_MostRecentDay - _FirstDay ), _FirstDay )
I also want to note that I have a Rank column for my Date, so that the earliest Date value has a rank of 1. Thank you in advance!
User | Count |
---|---|
15 | |
13 | |
12 | |
10 | |
10 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |