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

How to change the base function in Dax

my calculations are as below. 
Base = Sum( mydf[amount])
Function1 = Calculate([Base],....)
Function2 = Calculate([Base],....)
Function3 = Calculate([Base],....)
Total = Function1 + Function2 + Function3
###################
I would like change my Base functions as follows
Base_1 = SUMX(  mydf, mydf[amount]*1 )
Base_2 = SUMX(  mydf, mydf[amount]*2 ) 
and save them as Total_1 and Total_2
###################
If I wanna change the base function only once, I would just change it and the Total would be Total_1.
But how can i store it, if i wanna change twice efficiently ?

many thanks in advance.


5 REPLIES 5
Anonymous
Not applicable

I have a final dax function as Total. I would like to copy and save all the codes are needed to calculate to Total function.
Base = Sum( mydf[amount])

Function1 = Calculate([Base],....)
Function2 = Calculate([Base],....)
Function3 = Calculate([Base],....)
Total = Function1 + Function2 + Function3

How can i do that in power bi ?

Please describe what you mean by "copy and save".  Power BI has no memory. There is nothing in DAX that would allow you to call external functions.  The DAX paradigm for that is measures.

Anonymous
Not applicable

it is not what i am asking

I replied in your other post. DAX only has measures. Power Query has functions.

lbendlin
Super User
Super User

Staging is done in Power Query or further upstream, very rarely in DAX.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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