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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.