PowerBI DAX Measure To give a distinct count in last 30 days

0 votes

I'm new to PowerBI/DAX and can't seem to figure out how to make a measure that provides me a separate count of consumers that signed a form in the previous 30 days. I have a customer ID field (Cust ID), as well as the date the form was signed (FormSignDTS). This is how I went about it.

Last 30 Days = 
   VAR _TodaysDate = Today()
   VAR _StartDate = dateadd (Cutomer[FormSignedDTS], -30, Day)
  return 
  calculate (distinctcount (Customer[CustID]), keepfilters (Customer[FormSignedDTS] >= _StartDate))

But it got the following error:

 "a date column containing duplicate dates was specified in the call to function dateadd"

Any assistance you may provide will be highly appreciated! Thanks

Apr 28, 2022 in Power BI by Neha
• 9,020 points

edited Mar 4 44 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP