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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Shashi_Kant82
Helper I
Helper I

Slicer applied on lead stage column, calculate next stages

Hi All, 

 

I've a column with Lead statuses and their IDs, See below screenshot.

 

Shashi_Kant82_0-1679933066728.png

1. I need to add stage column as a filter and if i select any one stage then next stages count should appear, for e.g. if i select "engaged" in slicer then it should show me the count of Leads which have travelled from engaged to MQL and then Engaged to  Opportunity(Next Row) and so on.

2. Stages are not in order so i also have to sort them in correct order (Screenshot below for the order).

3. I should be able to calculate the coversion % like how many Leads converted from engaged to MQL, engaged to Opportunity and so on.

4. There is also repetetion of stages like for ID 1 we can have multiple MQL rows.

 

Shashi_Kant82_1-1679933822437.png

Kindly suggest. Thanks in advance. 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Shashi_Kant82 ,

 

Here's my solution.

1.Create a table for the slicer with stage and sort. I created it by entering data and there's no relationship between tables. 

vstephenmsft_0-1680073890004.png

vstephenmsft_1-1680073920016.png

 

2.Create a column to get the sort number in Table.

Sort Nmuber = CALCULATE(MAX('Table for slicer'[Sort Number]),FILTER('Table for slicer',[Stage]=EARLIER('Table'[Stage])))

vstephenmsft_2-1680073971678.png

 

3.Create a measure to return countings.

Count = var _num=SELECTEDVALUE('Table for slicer'[Sort Number])+2
return CALCULATE(COUNT('Table'[ID]),FILTER(ALLSELECTED('Table'),[Sort Nmuber]=_num))

If "Engaged" is selected, the measure returns 3.

vstephenmsft_3-1680074055776.png

 

4.If you want to calculate the percentage, and then calculate the total number of IDs, you can divide them, and so on.

Percentage = var _total=CALCULATE(DISTINCTCOUNT('Table'[ID]),ALLSELECTED('Table'))
return DIVIDE([Count],_total)

vstephenmsft_4-1680074204505.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Shashi_Kant82 ,

 

Here's my solution.

1.Create a table for the slicer with stage and sort. I created it by entering data and there's no relationship between tables. 

vstephenmsft_0-1680073890004.png

vstephenmsft_1-1680073920016.png

 

2.Create a column to get the sort number in Table.

Sort Nmuber = CALCULATE(MAX('Table for slicer'[Sort Number]),FILTER('Table for slicer',[Stage]=EARLIER('Table'[Stage])))

vstephenmsft_2-1680073971678.png

 

3.Create a measure to return countings.

Count = var _num=SELECTEDVALUE('Table for slicer'[Sort Number])+2
return CALCULATE(COUNT('Table'[ID]),FILTER(ALLSELECTED('Table'),[Sort Nmuber]=_num))

If "Engaged" is selected, the measure returns 3.

vstephenmsft_3-1680074055776.png

 

4.If you want to calculate the percentage, and then calculate the total number of IDs, you can divide them, and so on.

Percentage = var _total=CALCULATE(DISTINCTCOUNT('Table'[ID]),ALLSELECTED('Table'))
return DIVIDE([Count],_total)

vstephenmsft_4-1680074204505.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

Shashi_Kant82
Helper I
Helper I

guys, Please help. i am stuck here.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.