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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
unnijoy
Post Prodigy
Post Prodigy

DAX formula help

Hi,

 

I have usernames in Col A and Date of plan Assign in column B. I need a formula that help me the disting count of useres added till up to each month.

User NameAssign Date
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
CHRISTOPHER.PEERS01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
leighann.worrall01/08/2019
CHRISTOPHER.PEERS01/08/2019
steven.fraser01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
CHRISTOPHER.PEERS01/08/2019
leighann.worrall01/08/2019
rebecca.curran01/08/2019
steven.fraser01/08/2019
ANTHONY.CASSIDY11/14/2018
erica.estevao12/03/2018
ANTHONY.CASSIDY11/14/2018
erica.estevao12/03/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
ANTHONY.CASSIDY11/14/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018
erica.estevao12/03/2018

 

From the above example i will take Assign date as my X Axis. so it will be Nov 2018, Dec 2018, Jan 2019.

 

in graph i need to get for Nov 2018 the distint count of usernaes assigned for Nov 2018. Then for Dec 2018 i need to get the distint count of users added from Nov 2018 to Dec 2018. And this should continue for every upcoming month. Means for Jan it should get the disintg count from Nov 2018 to Jan 2019.

 

Please help me with this.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Here is an example file, hope that this helps. I added a date table and then two Dax functions.

 

DistUsers

Excel Table

 

Distinct UserNames = DISTINCTCOUNT(Table2[User Name])
Acc. Distinct UserName = 
VAR minDate = CALCULATE(MIN(Dates[Date]);ALLSELECTED(Dates))
VAR maxDate = MAX(Dates[Date])
VAR distMonth = 
    SUMMARIZE(
        FILTER(
            ALL(Dates);
            Dates[Date] >= minDate && Dates[Date] <= maxDate
        );
        Dates[Year-Month];
        "DistCount";[Distinct UserNames]
    )
RETURN
SUMX(
    distMonth;
    [DistCount]
)

Regards,

Kristjan76

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Here is an example file, hope that this helps. I added a date table and then two Dax functions.

 

DistUsers

Excel Table

 

Distinct UserNames = DISTINCTCOUNT(Table2[User Name])
Acc. Distinct UserName = 
VAR minDate = CALCULATE(MIN(Dates[Date]);ALLSELECTED(Dates))
VAR maxDate = MAX(Dates[Date])
VAR distMonth = 
    SUMMARIZE(
        FILTER(
            ALL(Dates);
            Dates[Date] >= minDate && Dates[Date] <= maxDate
        );
        Dates[Year-Month];
        "DistCount";[Distinct UserNames]
    )
RETURN
SUMX(
    distMonth;
    [DistCount]
)

Regards,

Kristjan76

Hi @Anonymous  thanks for your help.  I got the solutuion by using the below formula.

 

Total = CALCULATE(DISTINCTCOUNT(Table[USERNAME]),FILTER(ALLSELECTED(Table),Table[Learning Plan Assigned Date]<=MAX(Table[Learning Plan Assigned Date])))
Anonymous
Not applicable

Great

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors