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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Chari
Frequent Visitor

Sum of multi columns and should display individual columns based on selection.

Hi All.
I summed 4 columns of data using the SUMX function
Chari_0-1713367170174.png

test = CALCULATE(SUMX('Table','Table'[Dad] +'Table'[daddid]+'Table'[did]+'Table'[not]))
Chari_1-1713367297547.png

how to craete dropdwon with four column headers, if i select any one column header from dropdown. the total shpuld upadte with select column.

if i select DAD from dropdown the toatl should be 34
if i select NoT from dropdown the toatl should be 32

Chari_2-1713367632450.png

 



 

 




2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Chari 

Easiest way is to unpivot the four columns in power query hense the column names would appear as values in the [Attribute] column therefore you can use it as filter. 

View solution in original post

v-zhengdxu-msft
Community Support
Community Support

Hi @Chari 

 

Just as @tamerj1 said that you can unpivote the 4 column, here are detailed step:

First of all, select the four column and unpivote then in power query. 

vzhengdxumsft_0-1713409688285.png

Then add a measure:

Measure 2 = SUM('Table (2)'[Value])

The result is as follow:

vzhengdxumsft_1-1713409995691.pngvzhengdxumsft_4-1713410047098.pngvzhengdxumsft_5-1713410054964.png

 

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.

View solution in original post

2 REPLIES 2
v-zhengdxu-msft
Community Support
Community Support

Hi @Chari 

 

Just as @tamerj1 said that you can unpivote the 4 column, here are detailed step:

First of all, select the four column and unpivote then in power query. 

vzhengdxumsft_0-1713409688285.png

Then add a measure:

Measure 2 = SUM('Table (2)'[Value])

The result is as follow:

vzhengdxumsft_1-1713409995691.pngvzhengdxumsft_4-1713410047098.pngvzhengdxumsft_5-1713410054964.png

 

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.

tamerj1
Super User
Super User

Hi @Chari 

Easiest way is to unpivot the four columns in power query hense the column names would appear as values in the [Attribute] column therefore you can use it as filter. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors