Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have a sales table and a date slicer.
I want to be able to let user choose two dates from the slicer and the Change and % Change column would calculate base on what the users select. Can anyone give me some pointers?
Thank you.
Solved! Go to Solution.
Hi, what I have done is, created below sample data first.
Then created a slicer on date column.
Then created below measures:
Now obviously column headers are not showing dates. Hence created 2 measures for max and min date and just place on top of max and min columns.
Hi,
Here's my approach
Sales = sum(Data[sale])
FD = min(Calendar[date])
LD = max(Calendar[date])
Sale on FD = calculate([Sales],datesbetween(Calendar[date],[FD],[FD]))
Sale on LD = calculate([Sales],datesbetween(Calendar[date],[LD],[LD]))
Change = [Sale on LD]-[Sale on FD]
Hope this helps.
Hi,
Here's my approach
Sales = sum(Data[sale])
FD = min(Calendar[date])
LD = max(Calendar[date])
Sale on FD = calculate([Sales],datesbetween(Calendar[date],[FD],[FD]))
Sale on LD = calculate([Sales],datesbetween(Calendar[date],[LD],[LD]))
Change = [Sale on LD]-[Sale on FD]
Hope this helps.
Hi, what I have done is, created below sample data first.
Then created a slicer on date column.
Then created below measures:
Now obviously column headers are not showing dates. Hence created 2 measures for max and min date and just place on top of max and min columns.
Thanks, the solution works. How did you get the column headers to show? I moved the measure Max Selected Date on top of the max column and it becomes a column and not the header.
great to know it worked! you can create card visual and put max and min date into card visuals and put on top of respective column headers