Forum Discussion

cstarr465's avatar
cstarr465
Frequent Visitor
8 years ago
Solved

Dynamic column based on slicer selection (calculating conversion rate)

I have a table called Inbound Leads. This has all our leads, their contact, date of origination, source, etc. I also have a TRUE/FALSE column in there for if they have closed or not. I need to create a Combo Bar Chart that shows Count of Inbound Leads by Source and Coversion by Source (For this, I need Closed Leads/All Leads, for each Source).

 

Here's where it gets tricky, I also need to put a relative date slicer on it. So I can't just create a calculated column because then my date slicer won't work. Also, I want the ability to show a total conversion regardless of source, as a card.

 

 

TABLE COLUMNS (example):

 

A: Name

B: Source

C: Date Added

D: Closed? (True/False)

 

 

 

I apologize in advance if this is incredibly simple and I'm just inept!

  • Vvelarde's avatar
    Vvelarde
    8 years ago

    cstarr465

     

    try with this modification

     

    Conversion =
    DIVIDE (
        COUNTROWS ( FILTER ( Table1; Table1[Closed] = TRUE() ) ),
        COUNTROWS ( Table1 )
    )

     

     

6 Replies

  • Vvelarde's avatar
    Vvelarde
    Icon for Community Champion rankCommunity Champion

    cstarr465

     

    Hi, you can use a measure:

     

    Conversion =
    DIVIDE (
        COUNTROWS ( FILTER ( Table1; Table1[Closed] = "Yes" ) ),
        COUNTROWS ( Table1 )
    )

    And in your visual put this:

     

     

    Let me know if need more help

     

    Regards

    Victor

    Lima - Peru

    • cstarr465's avatar
      cstarr465
      Frequent Visitor

      Thanks for the response, I think I'm nearly there!

       

      It returned an error and won't load visuals with the measure: "DAX comparison operations do not support comparing values of type True/False with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."