Forum Discussion

plate201's avatar
plate201
New Member
5 years ago
Solved

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 | Con...
  • parry2k's avatar
    5 years ago

    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 Solutions

     

    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.

    .