Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I have a data base with last 14 days and i want for the last 7 days to see in a graph the evolution versus same day from the first week
can you help me please with this issue? i'm stucked on it.
table example:
day value
7/19/2018 5
7/20/2018 11
...
7/26/2018 10
...
8/1/2018 3
result graph with all 14 days in it and 0% value for first 7 and from 26 jul (+100% vs 19 jul) and so on
Thanks a lot!
Cosmin
Solved! Go to Solution.
Hi cosminc,
As a general solution, you can create a measure with some modification of the calculate column above and create a slicer to make user select date. Then replace DATE(2018, 7, 26) with SELECTEDVALUE(Table[Date]).
Regards,
Jimmy Tao
Hi cosminc,
To achieve your requirement, you can create two calculate columns using DAX below:
Seven_days_ago_value = VAR Seven_days_ago = Table1[day] - 7 RETURN CALCULATE(MIN(Table1[value]), FILTER(ALL(Table1), Table1[day] = Seven_days_ago)) Compare = IF(Table1[day] >= DATE(2018, 7, 26), Table1[value] / Table1[Seven_days_ago_value], 0)
Regards,
Jimmy Tao
hi,
thanks a lot
2 things:
the source is variable, i saw you put in the second expression a constant date, wright?
Compare = IF(Table1[day] >= DATE(2018, 7, 26),
and i have also other dimensions which are filtered on report and imagine that my table is more complex: let's say your example multiplied (add a new column with salesmen - S1, S2, S3 similar but with value column different - each salesman have these 14 days data)
when i filter data for S1 i need to see a graph with evlolution
thanks!
Cosmin
Hi cosminc,
As a general solution, you can create a measure with some modification of the calculate column above and create a slicer to make user select date. Then replace DATE(2018, 7, 26) with SELECTEDVALUE(Table[Date]).
Regards,
Jimmy Tao
Thanks!
Cosmin
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |