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.
Hi everyone, I'm having problems creating a measure that can calculate the difference between 2 dates in a slicer, i created this one but doesn't seems to work like i would want:
DELTA2 =
VAR LASTDAY = [HOY]
VAR PREVDAY = [ayer]
VAR TOODAY = CALCULATE(SUM('DATA BASE'[Tons]),'DATA BASE'[FECHA DE CAPTURA] = LASTDAY,VALUES('DATA BASE'[OP]))
VAR YESTERDAY = CALCULATE(SUM('DATA BASE'[Tons]),'DATA BASE'[FECHA DE CAPTURA] = PREVDAY,VALUES('DATA BASE'[OP]))
RETURN
TOODAY-YESTERDAY
where:
and,
my result is this:
it only kinda works with the last 2 dates, also i filtered the results of DELTA2 = 0, so it only displays the changes between days.
I would like to reach a matrix like this (whatever date i choose, will be always one day and the next):
if anyone can help me, i would really apreciatted.
How can i point to a slicer where i can select the days? instead of have to use 2 measures (today & yesterday) inside this measure
User | Count |
---|---|
16 | |
13 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |