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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
fbarini
Frequent Visitor

Issues with Funnel Visual

Hello, folks, I'm trying to include a Funnel Visual, but I'd like to also include the TOTALS on the first row, but in a way that it auto sort the remaining rows in a descending way. I managed to get it by using below, but I'm not being able to add the first row as the second example (this would be done in way that I could display the % of total alongwith the Number, which is very important here).

fbarini_3-1633444485328.png

Below the Measure used above:

 

 

 

Sol. Efetuadas = COUNTA(BaseAppVagas[Id])
StatusAprovFluxo is a Choice Column containing the following possibilities ["Approved"; "Hired"; "Rejected"; "In Analysis"]

 

 

 

 

Here, the problem lies with the auto sorting. Altough I cant get it to work with totals, I can't make the remainings rows auto sort themselves. Any suggestions?

 

fbarini_2-1633444275257.png

Below the Measures used above:

 

 

 

Sol. Efetuadas = COUNTA(BaseAppVagas[Id])
Sol. Em Analise = CALCULATE([Sol. Efetuadas], BaseAppVagas[StatusAprovFluxo] = "Em Análise")
Sol Reprov = CALCULATE([Sol. Efetuadas], BaseAppVagas[StatusAprovFluxo] = "Reprovado")
Sol. Aprovados = CALCULATE([Sol. Efetuadas], BaseAppVagas[StatusAprovFluxo] = "Aprovado")
Sol. Contratados = CALCULATE([Sol. Efetuadas], BaseAppVagas[StatusAprovFluxo] = "Contratado")

 

 

 

 

1 ACCEPTED SOLUTION

Not actually working... I'm getting an error "Switch Function cannot compare Text and Integers. Consider using Value or Format). And I did all the above..

 

But you gave me an idea. I added a new calculated column to your table "Tipo" with the totals and gone for:

 

Totals = TESTE = SUM(Teste[Totais])
Funnel:
Group - Tipo
Values - Totals

And finally got it! Thank you very much!

fbarini_1-1633703371031.png

 

View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @fbarini ,

 

Create a table with the status you need:

 

MFelix_0-1633593579920.png

Now add the following measure:

Total = SWITCH(
            SELECTEDVALUE(Tipo[ID]),
                1,  [Sol. Efetuadas],
                2,  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Em Análise"),
                3,  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Reprovado"),
                4,  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Aprovado"),
                5,  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Contratado")
            )

 

Do your funnel with the column Tipo on the group and the measure on the values:

MFelix_1-1633593712581.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Not actually working... I'm getting an error "Switch Function cannot compare Text and Integers. Consider using Value or Format). And I did all the above..

 

But you gave me an idea. I added a new calculated column to your table "Tipo" with the totals and gone for:

 

Totals = TESTE = SUM(Teste[Totais])
Funnel:
Group - Tipo
Values - Totals

And finally got it! Thank you very much!

fbarini_1-1633703371031.png

 

Hi @fbarini ,

 

That error occured because the format of the column ID was not formatted has number, ussualy I use an ID to make the switch to simplify the coding but you can use simple text so would be similar to this:

 

Total = SWITCH(
            SELECTEDVALUE(Tipo[Tipo]),
                "Sol. Efetuadas",  [Sol. Efetuadas],
                "Sol. Em análise",  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Em Análise"),
                "Sol. Reprov",  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Reprovado"),
                "Sol Aprovados",  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Aprovado"),
                "Sol. Contratados",  CALCULATE([Sol. Efetuadas],  BaseAppVaga[StatusAprovFluxo] = "Contratado")
            )

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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