Forum Discussion

John2029's avatar
John2029
Frequent Visitor
5 years ago
Solved

Display a calculated value based on start date and end date filters

Hello Power BI community, How can I display the % increase based on 2 values which are themselves based on the selection of 2 dates (start date and end date). For example: I select on a "start date...
  • v-kelly-msft's avatar
    5 years ago

    Hi  John2029 ,

     

    You need to create 2 slicer tables as below:

    Start date = VALUES('Table'[Start date])
    End date = VALUES('Table'[End date])

    Then create 3 measures as below:

    startdate value = CALCULATE(MAX('Table'[value]),FILTER(ALL('Table'),'Table'[Start date]=SELECTEDVALUE('Start date'[Start date])))
    Enddate value = CALCULATE(MAX('Table'[value]),FILTER(ALL('Table'),'Table'[End date]=SELECTEDVALUE('End date'[End date])))
    %increase = DIVIDE('Table'[startdate value], 'Table'[Enddate value])-1

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!