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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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])))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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])))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.