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 calculate dax measure of number of new customer 3 month ago

As picture below,

I use dax formula 

customer 3 monthago = CALCULATE(DISTINCTCOUNT('Sale_2017-2019'[CUST_ID]),'Sale_2017-2019'[status_cust]="NEW",DATEADD('Date'[Date],-3,MONTH))
 

1574223126324.jpg

but it mistake ,get result 

1574223365982.jpg

it should be , Thank you for your help 🙏

5 REPLIES 5
nahid3152
Helper II
Helper II

HI,
Create a column where ABC=DATEDIFF('Date'[Date],NOW(),MONTH)
and use it on ur function where abc < 3 .
Or
Can u share ur demo pabx with us ? Thanks

excuse me please

I another 1 question
I want to create measure for sumtotal separate custId in each year
example
cust id      sumtotal_2018
C0002         xxxx
C0003         xxxxx
.
.
I create measure is
cust_2018 =
SUMX(FILTER('Sale_2017-2019','Sale_2017-2019'[CUST_ID] && 'Sale_2017-2019'[BILL_DATE].[Year]=2018),[BILL_TOTAL_AMT])

but it not result

1574242207225.jpg

 

Do you have improve formula?

Thank you for your help 🙏

Hi,
For this do u have any flag or log to separate custId?
if yes use it as filter by year

Please Use this

abc 3 monthago = CALCULATE(DISTINCTCOUNT('Sale_2017-2019'[CUST_ID]),'Sale_2017-2019'[status_cust]="NEW",DATEDIFF('Date'[Date],-3,MONTH))

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.