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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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