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.
Hello PowerBi friends,
I would like to create a new column to calculate the time different ( duration ) between a "Fault" row and the "CRN_ATOEXEINS" row that is below the "Fault" row.
and to reduce data size,
removing all the "CRN_ATOEXEINS" rows that are not under "FAULT" rows.
only keeping the "Fault" rows and the "CRN_ATOEXEINS" that is underneath it.
PowerBi File Link:
https://drive.google.com/drive/folders/1uGwRe2irg58XoAEBtucQVpZwDfRAvmCb?usp=sharing
Solved! Go to Solution.
this is how i did it.
go the transform data
step 1 add a Index column.
step 2 do a if statement , if the previous row value is same as the current row, label "keep" if not, label "delete"
try if [alarm class] = #"Added Index" {[Index] - 1} [alarm class]
then "delete"
else "keep"
otherwise null
Step 3 filter to show only the " keep" rows.
this is how i did it.
go the transform data
step 1 add a Index column.
step 2 do a if statement , if the previous row value is same as the current row, label "keep" if not, label "delete"
try if [alarm class] = #"Added Index" {[Index] - 1} [alarm class]
then "delete"
else "keep"
otherwise null
Step 3 filter to show only the " keep" rows.
" the "CRN_ATOEXEINS" row that is below the "Fault" row."
Power BI has no idea what you mean when you say "below". Please add an index column that allows for the proper referencing.
Hi Lbendlin,
Yes that's what i wanted to do. but i'm not sure how i can add an index column that only identified them.
would you show me how it is done?
Thanks in advance
You can either use a suitable column in your soure data or you can add an index column in Power Query
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |