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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
plate201
New Member

Calculating Rate by Month/Overall (example data inside)

I have a series of date times. An indicator of whether the customer converted or not, every row is a customer.

Column A             Column B         Column C
2021-09-04 18:14 |Customer 1 | Converted
2021-09-05 12:13 | Customer 2 | Not Converted
 
1.1 how would i calculate the overall conversion rate and how would i put that in a plot?I figure it would be count(convertedornot)/count(totalcustomers). would i need to calculate this using dax then display it using a scorecard? what would the code/steps be based on the table above?
1.2 how do I plot conversion rate by month instead of overall? if I wanted to divide everything up by month and calculate individual conversion rates for all the months? would i need to create a new column and remove the day and time, or can i use a filter or something?
-------------------------------------------------------------------------------------------------------------
 
Column A                Column B
2021-09-04 18:14 | Direct
2021-09-05 12:13 | indirect

2.1 How would I plot the number of direct customers over time. If i wanted to do it by month would i need to create a new column with just year and month and then count the instances of "Direct" somehow in column B? what would be the steps required here as I am not sure how to do this.
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@plate201 first and foremost you need calendar table in your model and you can create one following my blog post Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

In Transform data, change your ColumnA to date and apply the changes. set relationship between calendar table and your table on the date column.

 

Add a following measure to get converted %

 

Count Rows = COUNTROWS ( yourTable )

% Converted = 
DIVIDE ( 
CALCULATE ( [Count Rows], YourTable[ColumnC] = "Converted" ),
CALCULATE ( [Count Rows], ALLSELECTED ( YourTable[ColumnB] )
)

 

To visualize, you can use any visual, let's say it is a line chart, on the x-axis using the Month column from the Calendar table and % Converted measure on value and it will get the converted trend.

 

Start with this and then can move to others which should be pretty straightforward

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

.

 

 

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

1 REPLY 1
parry2k
Super User
Super User

@plate201 first and foremost you need calendar table in your model and you can create one following my blog post Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

In Transform data, change your ColumnA to date and apply the changes. set relationship between calendar table and your table on the date column.

 

Add a following measure to get converted %

 

Count Rows = COUNTROWS ( yourTable )

% Converted = 
DIVIDE ( 
CALCULATE ( [Count Rows], YourTable[ColumnC] = "Converted" ),
CALCULATE ( [Count Rows], ALLSELECTED ( YourTable[ColumnB] )
)

 

To visualize, you can use any visual, let's say it is a line chart, on the x-axis using the Month column from the Calendar table and % Converted measure on value and it will get the converted trend.

 

Start with this and then can move to others which should be pretty straightforward

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

.

 

 

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.