SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stairway to PowerPivot and DAX - Level 9: Function / Iterator Function Pairs: The DAX MAX() and...


Stairway to PowerPivot and DAX - Level 9: Function / Iterator Function Pairs: The DAX MAX() and MAXX() Functions

Author
Message
Bill_Pearson
Bill_Pearson
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1017 Visits: 85
Comments posted to this topic are about the item Stairway to PowerPivot and DAX - Level 9: Function / Iterator Function Pairs: The DAX MAX() and MAXX() Functions
DanOrc
DanOrc
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 604
Hello Bill,

please could you help me with this one:

I want to find the NEW customers LAST YEAR, I mean I want to find the
number of NEW customers that bought in the same period last year.

I know how to calculate the number of total customers last year:
CALCULATE(DISTINCTCOUNT([ClientID]),SAMEPERIODLASTYEAR(DimCalendar[PK_Date]),all(DimCalendar))
also the number of new customers ever:
CALCULATE(
COUNTROWS(DimCustormer),
FILTER(
DimCustormer,
CALCULATE(COUNTROWS(SalesFact ))>0 &&
CALCULATE(
COUNTROWS(SalesFact ),
FILTER(
ALL(DimCalendar),
DimCalendar[PK_Date]<MIN(DimCalendar[PK_Date])
)
)=0
)
)

but I really want to also have the NEW Custormers LAST YEAR

Thank you so much!

I'm struggling for a week already Sad
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search