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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
cstarr465
Frequent Visitor

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

😧 Closed? (True/False)

 

 

 

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

1 ACCEPTED SOLUTION

@cstarr465

 

try with this modification

 

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

 

 




Lima - Peru

View solution in original post

6 REPLIES 6
Vvelarde
Community Champion
Community Champion

@cstarr465

 

Hi, you can use a measure:

 

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

And in your visual put this:

 

img1.png

 

Let me know if need more help

 

Regards

Victor

Lima - Peru




Lima - Peru

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."

Hi,

 

Replace the "Yes" with TRUE.  Does that work?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Same result. I'm using an IF statement in excel to produce the TRUE/FALSE, do I need to use something else, or a support column?

@cstarr465

 

try with this modification

 

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

 

 




Lima - Peru

Hi @cstarr465

 

Share the link from where i can download your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.