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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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

Anonymous
Not applicable

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
Anonymous
Not applicable

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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