Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Generate a summary table from different table.

I'm trying to generate a summary table B from different tables by date 

 

Table B contains, 

total orders, parameter B, total revenue.

 

 

What i'm using right now is multiple if conditon to get data from different tables total Orders

 
 
Total orders =
IF('Summary_Revenue'[Position] = "Inbound Agents", SUM('In House COST PER CALL'[total_orders]),
IF('Summary_Revenue'[Position] = "Senior CSR complaint",1,
IF('Summary_Revenue'[Position] = "At home agent",SUM('Home Agent COST PER CALL'[total orders]),
IF('Summary_Revenue'[Position] = "D",SUM('W Cost Per Call'[total orders]),
IF('Summary_Revenue'[Position] = "W",SUM(O[total orders]),
BLANK()
)))))
 
 
But what i'm looking for is a day summary for each individual postion group by its date.
 
How can i reach such result?
 
1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Are the tables related via "date" columns in "date" table?

like:

table1<->date table    table2<->date table   table3<->date table......

Do you need to select dates then Total orders for each individual postion group shows accordingly?

 

If so, try this measure:

Total orders =
IF (
    MAX ( 'Summary_Revenue'[Position] ) = "Inbound Agents",
    CALCULATE (
        SUM ( 'In House COST PER CALL'[total_orders] ),
        ALLSELECTED ( Date[date] )
    ),
    IF (
        MAX ( 'Summary_Revenue'[Position] ) = "Senior CSR complaint",
        1,
        IF (
            MAX ( 'Summary_Revenue'[Position] ) = "At home agent",
            CALCULATE (
                SUM ( 'Home Agent COST PER CALL'[total orders] ),
                ALLSELECTED ( Date[date] )
            ),
            IF (
                MAX ( 'Summary_Revenue'[Position] ) = "D",
                CALCULATE (
                    SUM ( 'W Cost Per Call'[total orders] ),
                    ALLSELECTED ( Date[date] )
                ),
                IF (
                    MAX ( 'Summary_Revenue'[Position] ) = "W",
                    CALCULATE ( SUM ( O[total orders] ), ALLSELECTED ( Date[date] ) ),
                    BLANK ()
                )
            )
        )
    )
)

Best Regards

Maggie

 

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Are the tables related via "date" columns in "date" table?

like:

table1<->date table    table2<->date table   table3<->date table......

Do you need to select dates then Total orders for each individual postion group shows accordingly?

 

If so, try this measure:

Total orders =
IF (
    MAX ( 'Summary_Revenue'[Position] ) = "Inbound Agents",
    CALCULATE (
        SUM ( 'In House COST PER CALL'[total_orders] ),
        ALLSELECTED ( Date[date] )
    ),
    IF (
        MAX ( 'Summary_Revenue'[Position] ) = "Senior CSR complaint",
        1,
        IF (
            MAX ( 'Summary_Revenue'[Position] ) = "At home agent",
            CALCULATE (
                SUM ( 'Home Agent COST PER CALL'[total orders] ),
                ALLSELECTED ( Date[date] )
            ),
            IF (
                MAX ( 'Summary_Revenue'[Position] ) = "D",
                CALCULATE (
                    SUM ( 'W Cost Per Call'[total orders] ),
                    ALLSELECTED ( Date[date] )
                ),
                IF (
                    MAX ( 'Summary_Revenue'[Position] ) = "W",
                    CALCULATE ( SUM ( O[total orders] ), ALLSELECTED ( Date[date] ) ),
                    BLANK ()
                )
            )
        )
    )
)

Best Regards

Maggie

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors