Forum Discussion
John2029
5 years agoFrequent Visitor
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...
- 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])-1And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
v-kelly-msft
Community Support
5 years agoHi 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!
John2029
5 years agoFrequent Visitor
Thanks a lot for your reply v-kelly-msft !
And for taking the time to build a report as well.
Very helpful thank you again very much!