Forum Discussion

waydec's avatar
waydec
Frequent Visitor
4 years ago
Solved

Lookup to return a value based on User selection

Hi, I'm looking for advice on the best way to return a corresponding date/time serial number based on a user-selected date and time selection so that the user can then use the date/time serial numbe...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi waydec ,

     

    Create a calculated table to show  datetime in decimal format.

    FromDateTime = GENERATESERIES(INT(MIN(Data[StartDateTime])), INT(MAX(Data[EndDateTime]))+1, 0.01)

    Then create a calculated column to show datetime format.

    Measure:

    FromDateTime Value = SELECTEDVALUE(FromDateTime[FromDateTime], INT(TODAY())-1)

    Calculated column:

    SelectedFromDateTime = [FromDateTime Value]

    Table looks like as below.

    Slicer looks like as below.

    For more details you may refer to this blog: How To DataTime Range Slicer

    Your demand is a good idea, while it is not supported to implement in Power BI currently.
    You can submit a new idea to improve the Power BI.
    It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.