cancel
Showing results for
Did you mean:
New Member

## Need DAX help to setup dynamic DATEDIFF dax formula

Per specific moment in time I would like to segmentate the client base in 4 groups based on the total days they are client (< 365 days, between 366 and 730 day, etc). The calculations of the total days is: days between the registration date and [x].

I'm struggling to make a dax formula that shows snapshots of the client base in the past while using the DATEDIFF formula for segmentation.

I started with an additional column to calculate the days: datediff = if(ISBLANK(X[Member until]),0,datediff(X[Registration date],now(),day). However, the date is not dynamic. A possibility is to create many additioanl columns with x, x-1, x-2 etc.  However, there should be a more easy solution.

Can someone help me to get the following calculations in place?

 X X-1 x-2 <=365 days .. count members where datediff(registration_date, x-1) <= 365 count members where datediff (registration_date, x-2) <= 365 between 366 days and 730 days .. count members where datediff(registration_date, x-1) between 366 and 730 count members where datediff(registration_date, x-2) between 366 and 730 between 731 days and 1091 days .. .. ... > 1092 days .. .. ..

X = Registration date (per week/month)

Solution Sage

If you don't get answers... well, that means people do not understand your requirements. Please make them clearer.

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.