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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Is there a way in Power BI to show the sum of multiple cloumns randomly

Hi,

I have three columns value in my Power BI report

let's just name them column1, column2, column3

I'm wondering if there is a visualization in Power BI that can show their sum value randomly

For example, in this visualization,

I can either select to show the sum value of column1+column2+column3 all toghther

or show two of them like column1 + column3, column2+ column3, and column1+column2 etc

or just single column's value

I hope there is a selector in the visualization that I can select the columns' value I want to show as sum

 

Is there a way in Power BI to do that?

Thanks

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Please unpivot the table and use a Matrix visual to display data.

 

Apply below steps in Query Editor mode.

Add an index column.

1.PNG

 

Select Column1, Column2 and Column3 at a time, then, Unpivot. Rename the new generated columns.

2.PNG3.PNG

 

Drag [ColumnName] into a slicer. Insert a Matrix visual, place [Index] into "Rows", [ColumnName] into "Columns" and [Value] into values.

4.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Please unpivot the table and use a Matrix visual to display data.

 

Apply below steps in Query Editor mode.

Add an index column.

1.PNG

 

Select Column1, Column2 and Column3 at a time, then, Unpivot. Rename the new generated columns.

2.PNG3.PNG

 

Drag [ColumnName] into a slicer. Insert a Matrix visual, place [Index] into "Rows", [ColumnName] into "Columns" and [Value] into values.

4.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks a lot, Yuliana

Anonymous
Not applicable

DAX has a random number generator function:

https://docs.microsoft.com/en-us/dax/rand-function-dax

 

You could attempt to write a SUMX function that goes through each value in your table, then use the RAND function in a nested IF statement to choose which values to grab a value from.

 

Not sure what the output would be like, but it seems possible.

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.