Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
daedah
Helper II
Helper II

show number customer 3 month ago

Excuse me please

 

I tring dax formula for calculate number of customer 3 month ago

As picture below

1574223126324.jpg

I use formula 

new cust 3 month age = CALCULATE(DISTINCTCOUNT('Sale_2017-2019'[CUST_ID]),'Sale_2017-2019'[status_cust]="NEW",DATEADD('Date'[Date],-3,MONTH))
 
But it mistake ,I get result
1574223365982.jpg
I should be improve it
Thank you for your help 🙏
1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @daedah 

 

I'd suggest you convert the Month as a number : 1,2,3,4...

Then use below measure:

Measure = var a = MAX('Table'[Month])-3
Return
IF(MAX('Table'[Month])<=3,BLANK(),CALCULATE(MAX('Table'[Values]),FILTER(ALL('Table'),[Month]=a))
)

0004.PNG

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

View solution in original post

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @daedah 

 

I'd suggest you convert the Month as a number : 1,2,3,4...

Then use below measure:

Measure = var a = MAX('Table'[Month])-3
Return
IF(MAX('Table'[Month])<=3,BLANK(),CALCULATE(MAX('Table'[Values]),FILTER(ALL('Table'),[Month]=a))
)

0004.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
nahid3152
Helper II
Helper II

HI,
Create a column For DATEDIFF where date convert to month
ABC=DATEDIFF(Date'[Date],NOW(),MONTH)
Then use it in a condition where ABC < 3 or ABC > 3 what ever ur need.

OR share some demo pabx file

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.