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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
amaniramahi
Helper V
Helper V

Slicer for Columns values

Hi,

 

I have the following table

1.png

 

I can create a new column to calculate the total sales of each Model or to calculate the sales during each month

but the problem is I want to know the model year (or use model year as a slicer)

 

How can I do that?

1 ACCEPTED SOLUTION

Yes, You can use the summarize table and union to achieve the same in DAX. Or can also be done by using unpivot code in the M language.

Refer -https://stackoverflow.com/questions/50213905/is-it-possible-to-unpivot-in-power-bi-using-dax

https://community.powerbi.com/t5/Desktop/Columns-to-Rows/td-p/136649

https://community.powerbi.com/t5/Desktop/Union-two-tables-with-different-columns-names/td-p/141153

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

You can use unpivot: https://radacad.com/pivot-and-unpivot-with-power-bi

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thanks @amitchandak , but the table I have is much more complicated, and have other columns that I still need them as columns to use them in filters and other slicers

I thought if there's maybe another way to create a separate table contains the sum of qty for each Model year but st the same time have a relationship with the main table to keep the data linked.

Yes, You can use the summarize table and union to achieve the same in DAX. Or can also be done by using unpivot code in the M language.

Refer -https://stackoverflow.com/questions/50213905/is-it-possible-to-unpivot-in-power-bi-using-dax

https://community.powerbi.com/t5/Desktop/Columns-to-Rows/td-p/136649

https://community.powerbi.com/t5/Desktop/Union-two-tables-with-different-columns-names/td-p/141153

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors