Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
2 years ago
Solved

Article in 2 Columns linking two 1 Column

Hi community!

I have a master data table in this format:

Article Type AArticle Type BAttribute 1
Bike_ABike_B5
Chair_AChair_B10

 

Then I have a transactional table that contains both Article Types in 1 Column and the sales in 1 column

ArticleTypeValue
Bike_AA50
Bike_BB50
Chair_AA50

 

Now I would like to create a table visual with that shows me in 1 column the Sales for Type A und 1 Column for Type B

Article Type AArticle Type B
10050

 

How would you do that?

How would you build the data model and the measure?

  • Hi joshua1990 ,

     

    the are two patterns how you can solve this (choose either one or the other).

     

    1.  Use a matrix visual. Use column "Type" of your transactional table as columns in the matrix visual. Use column "Value" as values in the matrix visual, using the automatic aggregation "summarize". If you want to show the exact column names that you have given, you can add a calculated column to the transactional table and use this instead of the "Type" column in the matrix visual:
      TypeLabel = "Article Type " & [Type]
    2. You can use a table visual and create two measures "Article Type A" and "Article Type B" and add these two measures to the table visual:
      Article Type A = CALCULATE(SUM('transactional table'[Value]),KEEPFILTERS('transactional table'[Type]="A")) 
      Article Type B = CALCULATE(SUM('transactional table'[Value]),KEEPFILTERS('transactional table'[Type]="B"))

    Kind regards,

    Martin

1 Reply

  • Martin_D's avatar
    Martin_D
    Solution Sage

    Hi joshua1990 ,

     

    the are two patterns how you can solve this (choose either one or the other).

     

    1.  Use a matrix visual. Use column "Type" of your transactional table as columns in the matrix visual. Use column "Value" as values in the matrix visual, using the automatic aggregation "summarize". If you want to show the exact column names that you have given, you can add a calculated column to the transactional table and use this instead of the "Type" column in the matrix visual:
      TypeLabel = "Article Type " & [Type]
    2. You can use a table visual and create two measures "Article Type A" and "Article Type B" and add these two measures to the table visual:
      Article Type A = CALCULATE(SUM('transactional table'[Value]),KEEPFILTERS('transactional table'[Type]="A")) 
      Article Type B = CALCULATE(SUM('transactional table'[Value]),KEEPFILTERS('transactional table'[Type]="B"))

    Kind regards,

    Martin