The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have streaming dataset. Requirement is to show live data. To perfrom some calculations I connect this dataset to powerbi Desktop and adding measures as per need. Now I am trying to create a measure which will give me perivous value of datetime. I want time diffrence of two entity. Please check below image.
In this case I want new column with perivous datetime. I want to calculate time diffrence of non Blank ESN value to next stopper_down_time_Stamp.
I tried one measure-
CALCULATE(index(-2,ALLSELECTED('live-table'[HosurDateTime]),ORDERBY('live-table'[HosurDateTime],ASC)),KEEPFILTERS('live-table'))
But this is giving me only one value for latest record. not complete column values.
Please help me out.
Thanks.
Solved! Go to Solution.
Hi, @BN_04
Use offset function instead of index function
Because Index only give static value and offset give daynamic value.
add column which give you previous value
create mesure of difference bw two dates
Hi, @BN_04
Use offset function instead of index function
Because Index only give static value and offset give daynamic value.
add column which give you previous value
create mesure of difference bw two dates
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
12 | |
9 | |
5 |