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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Renee_W
New Member

Summary Visual from multiple columns

I'm trying to create a summary visual based on data in multiple columns.  Basicly I'd like to create a summary that has two columns - alive/dead and 4 rows - adult, egg,immature, pupae, cysts. 

Renee_W_0-1720722176457.png

So that I can create this visual:

Renee_W_1-1720722210107.png

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Renee_W ,
Thank you @audreygerred  very much for the solution, and I've tried other ways to help you understand the problem:

If you want to generate the visual objects you need, you can use the UNION function to regenerate a new table that may help you.

SummaryTable = 
UNION (
    SELECTCOLUMNS (
        pest_data,
        "Lifecycle", "Adult",
        "Alive", pest_data[Alive Adults],
        "Dead", pest_data[Dead Adults]
    ),
    SELECTCOLUMNS (
        pest_data,
        "Lifecycle", "Egg",
        "Alive", pest_data[Alive Eggs],
        "Dead", pest_data[Dead Eggs]
    ),
    SELECTCOLUMNS (
        pest_data,
        "Lifecycle", "Cyst",
        "Alive", pest_data[Alive Cysts],
        "Dead", pest_data[Dead Cysts]
    )
)
AliveCount = SUM('SummaryTable'[Alive])
DeadCount = SUM('SummaryTable'[Dead])

vxingshenmsft_0-1722387759354.png

If you still have questions, I'll upload the Pbix file and hopefully help you out.

Hope it helps!

 

Best regards,
Community Support Team_ Tom Shen

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Renee_W ,
Thank you @audreygerred  very much for the solution, and I've tried other ways to help you understand the problem:

If you want to generate the visual objects you need, you can use the UNION function to regenerate a new table that may help you.

SummaryTable = 
UNION (
    SELECTCOLUMNS (
        pest_data,
        "Lifecycle", "Adult",
        "Alive", pest_data[Alive Adults],
        "Dead", pest_data[Dead Adults]
    ),
    SELECTCOLUMNS (
        pest_data,
        "Lifecycle", "Egg",
        "Alive", pest_data[Alive Eggs],
        "Dead", pest_data[Dead Eggs]
    ),
    SELECTCOLUMNS (
        pest_data,
        "Lifecycle", "Cyst",
        "Alive", pest_data[Alive Cysts],
        "Dead", pest_data[Dead Cysts]
    )
)
AliveCount = SUM('SummaryTable'[Alive])
DeadCount = SUM('SummaryTable'[Dead])

vxingshenmsft_0-1722387759354.png

If you still have questions, I'll upload the Pbix file and hopefully help you out.

Hope it helps!

 

Best regards,
Community Support Team_ Tom Shen

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

audreygerred
Super User
Super User

Hi! I would change the format of the data itself. Instead of columns like Alive Adult, Dead Adult, Alive Cyst, etc. have a column for Alive/Dead and column for Stage - like below:

audreygerred_0-1720723236046.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.