Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Matrix with different values in the rows

Dear All,

 

My below question is quite simple but I am not sure how easy is to be done in power bi. The below example is what I have (2 tables) hypersimplify:

 

CountryAmount
France10

 

CountryCityAmount
FranceParis3
FranceLyon2

 

What I want at the end of the day is to have a matrix table where the first category is the country (france) with the amount of 10

and then subcategories with the cities showing the amounts of them from the second table. In reality I dont want to sum the amounts.

 

Any Ideas?

 

Thank you in advance,

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello-

     

      You have a join issue.  If you want the individual parts, you need to add city to you first table.  If you want 10 showing up in each row, you can just join straight on country = France in PowerQuery.

     

    Jared

  • Anonymous's avatar
    Anonymous
    Not applicable

    Ok to make more understandable is that I have the below table 

     

    CountryBrandGPTP Conv rate
    FranceMP52          0,40
    FrancePP32          0,67

     

    Conv rate is the calculation TP/GP. that means that If I put the conv rate at the end of the day it will not appear the correct result.

     

    total GP =8 total TP= 4 : 4/8 = 0.5 

     

    power Bi Matrix table doesnt understand this :(. What I would do in Excel is to create a calculated field. 

     

    Any ideas about power bi?

     

    Best regards,

    • Anonymous's avatar
      Anonymous
      Not applicable
      In that case, I would create this as a measure. If you do:

      Calculate(sum(TP))/calculate(sum(GP)) it should give you what you want by putting this measure into your matrix visualization as a value.

      Jared