Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |