none
Display Customized Data Based on Sub Queries

    General discussion

  • Goal:
    In the Table A I would like to display the result

    ---------------------------------------
    PK_A    FK_B    CandyQuantity
    ---------------------------------------
    1          7          2
    2          4          5

    In order to display it, you need to have value 98 as requirement in the table D or Bridge.


    Problem:
    How should I create it based on DAX code in relation to SSAS tabular?


    Information:
    - No SQL code is allowed in this context. All table are acting as many-to-many.
    - DAX code only.


    Table A (Fact table)
    ------------------------------------
    PK_A  FK_B    CandyQuantity
    ------------------------------------
    1        7         2
    2        4         5
    3        5         3
    4        1         1


    Table B (Dimension table)
    --------------------
    PK_B
    --------------------
    7     
    4     
    5     
    1
    2


    Table C (Fact table)
    ------------------------
    PK_C  FK_B    Cost
    ------------------------
    98      7          20
    70      4          15
    42      5          10
    43      2          54


    Table Bridge (Bridge table)
    ---------------------------------
    PK_Bridge    FK_B    FK_D
    ---------------------------------
    1                  7          98
    2                  4          98
    3                  5          70


    Table D (Dimension table)
    ----------------------------
    PK_D    FK_B    Cost
    ----------------------------
    98         7         20
    70         4         15
    42         5         10
    43         2         54


    Thursday, May 23, 2013 5:17 PM

All replies