Forum Discussion
Sort data by day
- Anonymous1 year ago
Hi Manasi25 ,
Refer to the steps below. In PowerQuery, first sort by the number column, and then select the Alert column and Date column to remove duplicates.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
I created table with only on column. and its giving me below error.
- Manasi251 year agoHelper II
Okay, thats fine, what if I want to remove all duplicates and keep row of the alert which alerted first by date and time.
- bhanu_gautam1 year agoSuper User
Add a calculated column to rank the alerts by date and time:
AlertRank =
RANKX(
FILTER(
'YourTable',
'YourTable'[Date] = EARLIER('YourTable'[Date]) &&
'YourTable'[Alert] = EARLIER('YourTable'[Alert])
),
'YourTable'[Time], // Assuming you have a 'Time' column
,Create a new table that keeps only the first occurrence of each alert per day:
FirstAlertTable =
FILTER(
'YourTable',
'YourTable'[AlertRank] = 1
)
This approach uses the RANKX function to rank the alerts by date and time, and then filters the table to keep only the first occurrence of each alert per day. If you do not have a time column, you can rank by the date alone.- Manasi251 year agoHelper II
It doesn't make any difference with my actual data. I want to keep row from "Alert" col by day.
Want to remove duplicates. Keep the only one alert which has 5 duplicates entry in a day. Same for another could happen, but want entry only 1 for each day.