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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Need Help with writing DAX to satisfy the Logic

Hi There,

 

I have 10 tables from 3 different sources, as per the business reqirement we have merged the tables with left outer join and made one single table with required columns. On top of that we created some measures and columns to get the total business spend.

Till now all the measures are working fine and matching with the data. When ever i split the measure to see the yearwise spend i am getting huge variation in Spend when sum them all together.

Can any one let me now where i am doing wrong to calculate the yearwise spend.

Below you can find the DAX for the Measure calculation and some data samples.

@amitchandak @tamerj1 

Total Business Spend = CALCULATE(SUMX(SUMMARIZE(Merge_table,Merge_table[Project],Merge_table[unit],Merge_table[code], "MAX",MAX(Merge_table[Spend])),[MAX])).

Note: Merge_table[Spend] is custom column derived with business formulae.

 

The above dax have derived to allimenate the duplicate values and get the exact value for Spend.

now when i try to find the Yearwise spend by the below dax.

Spend YTD = CALCULATE(SUMX(SUMMARIZE(Merge_table,Merge_table[Project],Merge_table[unit],Merge_table[code], "MAX",MAX(Merge_table[Spend])),[MAX]),Merge_table[date])

 

Total business spend = 2670M

spend Ytd = 

20201100
2021900
20221400
2023200
20241800
Total5400

 

Now i want to split Total business spend = 2670 in  Yearwise, Where sum of all year should be 2670.

 

Thanks for the help in advance.

 

Regards

Power Mate

2 REPLIES 2
CarlosAugusto
Frequent Visitor

Buenas tardes amigo, tiene las tablas originales para el calculo? de forma que se pueda visualizar mejor y tener alguna solucion.

 

Saludos!

Anonymous
Not applicable

Gracias por la respuesta. Tengo las tablas, pero están restringidas y no puedo compartir los datos aquí.
Si quieres te explico el tema detalladamente.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.