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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
StefanoGrimaldi
Resident Rockstar
Resident Rockstar

Parsing a DAX variable into functions - Questions

hey guys, 

 

 I have a table I create by using a union function the topic its one of the tables usid in the union I made it come from a dax variable (that are inmutable) to avoid creating a new one and parsing it to the union fuction (example below), now since its a variable it doesnt let me use fuction as sum on the variable column generated, 

1) its there a workaround this? or how would you guys approach such a request? 

NOTE: for this specific problem if delete the sum function would do the work and work perfectly, I want to know if theres a workaround to make it work woith functions

 

 here the dax code with the situation planted: 

 
 

StefanoGrimaldi_2-1609883255435.png

 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




4 REPLIES 4
AlB
Community Champion
Community Champion

@StefanoGrimaldi 

I don't get it. What is the expected result then? What should the SUM( ) do?

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 

 

the sum function in that context would summarize the value of that column for the previously added columns in the select column function, that works fine when you do it to a table existing in the model, but since dax variables are inmutable object functions like sum, calculate, etc doesnt work on them, so I was guessing if theres a work around that, that was the question, a sumnx wont work since its create a value from a table separated from the columns in the selectcolumn function. 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




AlB
Community Champion
Community Champion

Hi @StefanoGrimaldi 

Use

SUMX(TableVariableName, [ColumnName])

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Cheers 

 

SU18_powerbi_badge

already tried 😛 when you do that it give a absurd result value, doesnt segment the the columns agrupation since the sumx get its a a separate sum from a separate table. 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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