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
Anmolgan
Post Prodigy
Post Prodigy

Count distinct values that adds each month?

I want to count distinct values that gets added each month

NAMESDate
A111130-May-19
A223422-Jul-19
A214128-Jun-19
A223423-Jun-19
A243129-Jun-19
A42113-May-19
A2431226-Jun-19
A21514-Jul-19

 

Above is just a sample, considering above as distinct I only need to count values that are added as a distinct.

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anmolgan 

you can create a calculated table

Table 2 = SUMMARIZE('Table';'Table'[NAMES];"First appear";MIN('Table'[Date]))

then in visual set date hierarchy items Year and Month to display

Снимок.PNG

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

8 REPLIES 8
az38
Community Champion
Community Champion

Hi @Anmolgan 

please, demonstrate to us your desired output to help you

thx

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 I need to find what are the number of Names that gets added each month, now if I create a table visual in powerbi using month and names as Distinct Count, it will show me overall customers that keeps on increasing for example:

 

AUG100
SEP150
OCT200
NOV201

 

if you look above, count keeps increasing now I need to find added customers so i need the below output:

 

monthcount distinct of namesadded names each month
AUG100100
SEP15050
OCT20050
NOV2011

 

I hope that I was able to explain you?

az38
Community Champion
Community Champion

Hi @Anmolgan 

you can create a calculated table

Table 2 = SUMMARIZE('Table';'Table'[NAMES];"First appear";MIN('Table'[Date]))

then in visual set date hierarchy items Year and Month to display

Снимок.PNG

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
az38
Community Champion
Community Champion

@Anmolgan 

share pbix if you can 🙂

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

I had shared the pbix with you in your private chat

@az38 

 

Something is wrong in my case, I have used your formula, if you look at the Actual Count is the count that keeps on increasing each month, and the Count GRS Name is what I have build according to your DAX measure, the subtraction should be correctly performing if I am correct, and I have build Many 2 Many relationship between the custom table and the master tables, do let me know if you need the pbix file.

 

Screenshot (109).png

@az38  I need to find the subtraction of previous month count with the current month count for example:

 

monthcount distinct of names
AUG100
SEP150

 

the above I have but I want to know how many of the count added on September that is 150-100=50, this I want to do for all the months of any year.

az38
Community Champion
Community Champion

@Anmolgan 

in my statement you will see how many new customers appear in each month you need. as i see is exactly your task

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

 

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.