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
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
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.