Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Calculation based on data grouping

Hi All,

 

I have a Fact table (left) and Dim table (right). Below is a table visual I want to show in the dashboard. 

For row Brand A, I want to show the percentage where the Denominator is 10 (actual) and Numerator is 3 (sales).

 

Brand A % = 10/3

Brand B % = 20/6 

 

Is it possible to achieve this? Can anyone show me the method?

 

 

 

 

Thanks & Regards,

BK

1 Reply

  • @beekee,

    Try this:

    1. Add the Group column to the Mark table.

    DataInsights_0-1604266642149.png

    2. Create a relationship between the Sales and Brand tables.

    DataInsights_1-1604266655441.png

    3. Create measure.

    Market = 
    VAR vNumerator =
        SUM ( Sales[Actual] )
    VAR vDenominator =
        SUM ( Sales[Sales] )
    VAR vResult =
        DIVIDE ( vNumerator, vDenominator )
    RETURN
        vResult

    4. Create a visual table, using the Mark column of the Mark table.

    DataInsights_2-1604266673500.png