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
capibaraya
Regular Visitor

month over base change

Hi! I'm looking for the solution of the following task. 

 

I have table with columns: period, client id (those who have used service this month), month of first visit. I have a histogram for visits with period as X and client id count as Y. Also I have a slicer with the month of first visit. So I can choose those clients, who had used service for the first time in May, and see how many of them used it again in July, August, October etc. Now I need to add a line (to calculate a measure) to show, which percentage of May-clients returned back in  July, August, October etc. So I have to choose the base month for calculation depending on the value of 'month of first visit' choosen on slicer. I'll be thankfull if someone can help me. 

 

mon  count desired column

jan    0      0%

feb    0      0%

mar   0      0%

apr   100   100%

may  80     80%

jun    71     71%

july   10     10%

aug   2       2%

sep   0        0%

oct    0        0%

nov   0        0%

dec   0        0%

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @capibaraya,

 

Please refer to below measures:

count client per month = DISTINCTCOUNT('Test Tb1'[Client id])
Count all in selcted month = CALCULATE(DISTINCTCOUNT('Test Tb1'[Client id]),ALL('Test Tb1'[Month]))

percentage = [count client per month]/[Count all in selcted month]

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @capibaraya,

 

Please refer to below measures:

count client per month = DISTINCTCOUNT('Test Tb1'[Client id])
Count all in selcted month = CALCULATE(DISTINCTCOUNT('Test Tb1'[Client id]),ALL('Test Tb1'[Month]))

percentage = [count client per month]/[Count all in selcted month]

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.