Club Power BI

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.

get items according to status based on a date condition

  • 1.  get items according to status based on a date condition

    Posted 15 days ago
    hello

    i have a question about of how can i get a measure for use with slice visor

    i have a table with status like is showed here

    maq Status Timestamp
    dev1 on 10/27/2021 10:20
    dev1 on 10/27/2021 9:20
    dev1 on 10/27/2021 8:20
    dev1 on 10/27/2021 7:20
    dev1 on 10/27/2021 6:20
    dev1 on 10/26/2021 21:20
    dev1 off 10/26/2021 20:20
    dev1 off 10/26/2021 19:20
    dev1 on 10/25/2021 11:20
    dev1 on 10/25/2021 10:20
    dev1 on 10/25/2021 9:20
    dev1 on 10/25/2021 8:20
    dev1 off 10/23/2021 9:20
    dev1 off 10/23/2021 5:20
    dev1 on 10/22/2021 23:20
    dev1 on 10/22/2021 19:20
    dev1 on 10/21/2021 19:20
    dev1 on 10/21/2021 14:20
    dev1 on 10/20/2021 17:20
    dev1 on 10/20/2021 12:20
    dev1 on 10/19/2021 20:20
    dev1 on 10/19/2021 18:20
    dev1 on 10/18/2021 9:20
    dev1 on 10/18/2021 7:20
    dev2 off 10/27/2021 10:20
    dev2 off 10/27/2021 9:20
    dev2 off 10/27/2021 8:20
    dev2 off 10/27/2021 7:20


    using your sample table that shows # of off status by device in a given day .the idea is compare with respect to total rows from that day
    after that we have the output like is showed below

    Any help would be greatly appreciated



    Row Labels dev1 off dev1 tot true/false dev1 dev2 off dev3 tot true/false dev2 dev3 off dev3 tot true/false dev3 dev4 off dev4 tot true/false dev 4
    10/21/2021​
    0​
    2​
    FALSE​
    1​
    2​
    FALSE​
    0​
    2​
    FALSE​
    0​
    2​
    FALSE​
    10/22/2021​
    0​
    2​
    FALSE​
    0​
    2​
    FALSE​
    0​
    2​
    FALSE​
    1​
    2​
    FALSE​
    10/23/2021​
    2​
    2​
    TRUE​
    0​
    2​
    FALSE​
    0​
    2​
    FALSE​
    2​
    2​
    TRUE​
    10/25/2021​
    0​
    4​
    FALSE​
    2​
    5​
    FALSE​
    4​
    4​
    TRUE​
    4​
    4​
    TRUE​
    10/26/2021​
    2​
    3​
    FALSE​
    3​
    3​
    TRUE​
    3​
    3​
    TRUE​
    3​
    3​
    TRUE​
    10/27/2021​
    0​
    5​
    FALSE​
    5​
    5​
    TRUE​
    5​
    5​
    TRUE​
    5​
    5​
    TRUE​
    suppose today is
    10/27/2021​
    10/27/2021​
    10/27/2021​
    when select visor slicer 2 lastdays 3lastdays 4lllastdays
    output last N days with all status off dev2
    dev3
    dev4
    dev3
    dev4
    dev4


    ------------------------------
    adolpo agustini
    enginner
    ------------------------------