Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

Create button with time filter

I am needing the following: I have a table that has a date and time of a production, the production is divided into three shifts and I want that by means of a button I can see that it occurred in th...
  • Syndicate_Admin's avatar
    3 years ago

    I solved it as follows:

    I generated a column with the following:

    = Table.AddColumn(#"Columna condicional agregada", "TurnoDia", each if DateTime.Time([Hora de finalización]) < #time(6, 10, 0) then "TN" else if DateTime.Time([Hora de finalización]) < #time(14, 34, 0) then "TM" else if DateTime.Time([Hora de finalización]) < #time(23, 0, 0) then "TT" else "TN")

    Then create a slicer where I can filter by TN, TM or TT