Forum Discussion

Cobalt2234's avatar
Cobalt2234
Regular Visitor
1 year ago
Solved

demultiplying rows on a table based on a specific filtered value

Hello, The question is not easy to formulate, so, let's take an example :   Lets imagine that I have these 2 tables :   DIMTABLE : Service_CD Application_CD 10076 6832 10076 10314 ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Cobalt2234 

     

    Here are 2 workarounds for your reference:

    1:

    Click Transform data to go to power query.

    First of all, Duplicate the DIMTABLE(Another table will do the same).

    Click the Merge Queries in the Home pane:

    Select the Application_CD columns and click OK.

    Expand the table:

    The result is as follow:

     

     

    2:

    Add a calculated table:

    Table = 
    	SELECTCOLUMNS(
    		FILTER(
    			CROSSJOIN(
    				'DIMTABLE',
    				'FACT_TABLE'
    			),
    			'DIMTABLE'[Application_CD] = 'FACT_TABLE'[Application_CD]
    		),
    		'DIMTABLE'[Service_CD],
    		'FACT_TABLE'[Application_CD],
    		'FACT_TABLE'[DATE],
    		'FACT_TABLE'[VAL1],
    		'FACT_TABLE'[INF],
    		'FACT_TABLE'[DESC]
    	)

    The result is as follow:

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.