Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Divide values in a line chart

Hello,

 

I have 2 tables and I would want to divide the values per month.

Take note that these values are found in the same table but different metrics type.

 

1st table has the Metric type Deployment and the 2nd one has P1 & P2.

I wanted to create another Line Chart that would divide September Deployment to September P1 & P2 and will show up in another chart as the result in a September point. Same with October and November.

 

6 Replies

  • Anonymous you should add a date dimension in your mode which you set a relationship with these two tables on the date column, it will be one to many relationships and then on visuals use date from this new dimension.

     

    For this new calculation, add a new measure based on your logic

     

    New Metric = DIVIDE ( [Metric from Table a], [Metric from table b] )
    
    or 
    
    New Metric = DIVIDE ( SUM ( TableA[ColumnA] ), SUM ( TableB[Column1] ) + SUM ( TableB[Column2] )

     

    To add a simple date dimension, check this post

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello, I appreciate your response but the numbers are found in the same table and column. Just different metric type which is filtered in the filter pane. Do you have any other ideas?

      Or if your idea worked, can you explain step-by-step?

  • Anonymous , They need to joined with coomon date table then you can do like

     

    divide([Deployment], [P1 & P2])

     

    To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

  • Anonymous share sample data or if possible, share pbix file (remove sensitive info before sharing) and share it using one drive/google drive, provide the expected output and I will get back to you. Maybe it will be easier to provide a solution. Cheers!!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello, I can share the file via google drive. What's your email?

  • Anonymous my email is in my signature but you can share it with public access, until something you don't want to share publically then feel free to send it by email. Your call.