New Enterprise DNA Initiatives

Count Condition with DAX

Hi all,
I am trying to implement a logic and don’t base on my requirement but don’t know how to go about it.

I want to display my report as seen above.
The requirement is:
Against the MonthYear column, find the difference in days between the first day of purchase and the next purchase within a given date range on the slicer. This measure already exists. The next step whichis the measure I want to compute, is check or do a case statement, e.g, case when the difference in days is >1 and =< 8 (the difference in days is greater than 1 but less or equal to 8) then 1 else 0. This last bit is the measure I want to put against MonthYear in the image above.

I have attached a file.
Thank you

Days_Between 1st_and_Last_Purchase.pbix (389.8 KB)

Hi @upwardD, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.
  • When posting a topic with formula make sure that it is correctly formatted to preformatted text </>.
  • Use the proper category that best describes your topic
  • Provide as much context to a question as possible.
  • Include the masked demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.

Please also check the How To Mask Sensitive Data thread for some tips on how to mask your pbix file.

You are right!
I’ll re-compose my question in another post.
Thank you for the great support.