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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How to sum daily distinct count over the month ?

Hi,

I'm new to the Power Bi community, and I can't find any solution to my probleme 😞

So I'm trying here to get some help, hoping a Power Bi veteran can help me !

 

So here is my issue (see the screenshot)

StanislasP_0-1603878843715.png

 

I have data about my email campaigns, and I want for every email campaigns to show the count of delivered, opened and clicked message by distinct email over the month.

 

The problem is that the distinct count on the emails is done over the month, whereas I would like it to be done per day and after being able to sum the daily distinct values over the month.

 

Is there a way to achieve this ?

 

Thank you very much for your time,

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try something like

sumx(Values(Table[date]), calculate(distinctcount(Table[email])))

View solution in original post

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

 

Measure = 
VAR x = 
CALCULATE(
    SUM([Values]),
    FILTER(
        ALL(Sheet7),
        Sheet7[Category] = MAX(Sheet7[Category]) && Sheet7[Item] = MAX(Sheet7[Item]) && Sheet7[Month] = MAX(Sheet7[Month])
    )
)
RETURN
IF(
    HASONEFILTER( Sheet7[Item]),
    x,
    SUMX(
        FILTER( Sheet7, Sheet7[Category] = MAX(Sheet7[Category]) ),
        [Values]
    )
)

 

 

v-lionel-msft_0-1604044962573.png

If not please show the sample data of the fact tables and expected output results .

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thanks you both for your answer ! 

The first one worked well for me so thanks again 🙂

 

Stanislas

amitchandak
Super User
Super User

@Anonymous , Try something like

sumx(Values(Table[date]), calculate(distinctcount(Table[email])))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.