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

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

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.