Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I try to calculate a measure of the evolution of the likes according to the two selected date.
Here is an example of my data:
Page | Likes | Date |
P1 | 12 | 2022-12-12 |
P1 | 15 | 2022-12-24 |
P2 | 25 | 2022-12-12 |
P2 | 68 | 2022-12-24 |
.... | .... | .... |
On PowerBI I have the date in filter and a matrix with the selected pages and dates. Here is an example :
So the measure I'm trying to calculate for P1 for exemple is data['Likes'] in 2021-01-11 divide data['Likes] in 2020-12-28
I don't know if it is possible to make the calculation according to the selected date or all the dates !! Could someone tell me how to calculate a measure of the evolution ?
Thank's in advance,
bof,
Solved! Go to Solution.
@SoufTC , Check if a measure like below can help
//Difference between two selected dates
diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = maxx(allselected('Date'),'Date'[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] =_max )) -
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] =_min ))
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |