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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
jeggen
Helper II
Helper II

Sum Columns based on Filter

I am using a visualization (sanka chart) that only allows one value but the chart compares time periods. I would like the user to be able to select which values are being used on the visualization by using a slicer.

 

Sample data would be:

CustomerYear 1Year 2Year 3Year 4Sum*
11010203070
2100102050180

 

I envisoned adding the column "Sum" above and using that for the value on my visualization. Then ideally having a slicer where the user can select which of the other columns are included in this, e.g., if they select just year 1 the visual shows values based on year 1 data, if they select year 2, just year 2 data etc. Is it possible to do something like this with a column who's data is derived from a variable combination of other columns based on a filter?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jeggen ,

You said that your chart only allows one value and plan to create a column 'Sum' to display the data.I think I could use unpivot.

The Table data is shown below:

vzhouwenmsft_0-1717725058940.png

Please follow these steps:

1.Change table structure.

vzhouwenmsft_1-1717725144882.png

vzhouwenmsft_2-1717725162975.png

2.Use the following DAX expression to create a measure

 

Sum = SUM('Table'[Value])

 

3.Final output

vzhouwenmsft_3-1717725276394.png

vzhouwenmsft_4-1717725301630.png

Best Regards,
Wenbin Zhou
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
jeggen
Helper II
Helper II

Thanks! Unpivoting was the route to go.

Anonymous
Not applicable

Hi @jeggen ,

You said that your chart only allows one value and plan to create a column 'Sum' to display the data.I think I could use unpivot.

The Table data is shown below:

vzhouwenmsft_0-1717725058940.png

Please follow these steps:

1.Change table structure.

vzhouwenmsft_1-1717725144882.png

vzhouwenmsft_2-1717725162975.png

2.Use the following DAX expression to create a measure

 

Sum = SUM('Table'[Value])

 

3.Final output

vzhouwenmsft_3-1717725276394.png

vzhouwenmsft_4-1717725301630.png

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

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.