cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Computation with Custom Date Slicer

Hi Everyone. I have never used DAX before and i need some inputs on this one:

 

I would like to compare the values between two dates, based on the dates that the user will select on the date slicer.
For example, if the user selects the dates June 28 and June 29, it should get the difference between the two dates using  this formula
(clicks from today's date - clicks from previous day ) / clicks from previous day.

if the user select july 3 and july 4, then it should do the same formula.

Any ideas?

2 REPLIES 2
Microsoft
Microsoft

@deb,

Please elaborate more details about your formula. What do you mean by “clicks from today's date”  and “clicks from previous day”? And do you select two values in the date slicer at once? You can post expected result based on your sample data in a table if possible.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper I
Helper I

If you want to get the difference, create a measure:

 

 

DateDifference = DATEDIFF(MIN('Table'[Date]),MAX('Table'[Date]),DAY)

 

Use that measure in other calculations as needed.

 

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors