Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi guys I want to calculate differences between volume per ID. I have no possibility to create Index in PQ.
So for example I want the yearliest value that day for that ID to be 0, then as per example :
7.17-7.16
7.16-7.15 and so on
@Aleksandra_MLT , Try
A new colum =
var _max = maxx(filter(Table, [Id] = earlier([ID]), [Timestamp at Datetime] <earlier([Timestamp at Datetime] )),[Timestamp at Datetime] )
return
if(isblank(_max), blank(), datediff(_max,[Timestamp at Datetime] , second))
or a new measure
measure =
var _max = maxx(filter(allselected(Table), [Id] = max([ID]), [Timestamp at Datetime] <max([Timestamp at Datetime] )),[Timestamp at Datetime] )
return
if(isblank(_max), blank(), datediff(_max,max([Timestamp at Datetime]) , second))
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |