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 (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1311 Visits: 89
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 (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 626
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
denisribeiro
denisribeiro
SSC-Enthusiastic
SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)

Group: General Forum Members
Points: 182 Visits: 34
The article´s title is wrong.
Its not Power BI but PowerPivot you are using.
pietlinden
pietlinden
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61147 Visits: 18217
DanOrc - Saturday, February 7, 2015 11:02 AM
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 thenumber 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 YEARThank you so much!I'm struggling for a week already Sad


Don't you want to get the FIRSTDATE for each customer's sale (across all years). Then you know when they were new.
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