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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
refint650
Helper III
Helper III

Assign Measure value to Column - for stack graph

Hello 

 

I'm using for stack bar chart  - one measure with multiple variables and filter conditions. 

how to match variable name to column name in chart.

 

Countx = count(product) 

 

Chart Measure  =

 

Var _Apple = calculate ([CountX], type ='Apples' and  Product = "Fruit" and Date =today()

Var_Raisins = Calculate([CountX], type ='Raisins' and  Product = "Other" and year(Date) =year(today())
Var_all = Calculate([CountX], year(Date) <=year(today())

-- i 'm doing of union all counts.

var _U1 = union(_Apple,_Raisins, All)

return 

 

addcolumns( _u1 , "apples", _Apple) ...?

 

 

refint650_0-1674685452781.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@refint650 , You can check if calculation group can help

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

1 REPLY 1
amitchandak
Super User
Super User

@refint650 , You can check if calculation group can help

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.