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
arvindyadav
Post Partisan
Post Partisan

Total value is not correct.

Hi Team,

 

I am getting total value Incorrect.

The total value display in power bi for the entire month of the previous period but I need only total value for the previous period for current date matching.

 

Please find measure for the previous period:

previous period = 

Previous Period Profit = CALCULATE(SUM(Table1[Profit]),SAMEPERIODLASTYEAR(Table1[Date]),ALL('Table1'))
 
and measure for current month :
This Month Profit = CALCULATE(SUM(Table1[Profit]),FILTER(Table1,YEAR(Table1[Date])=YEAR(TODAY()) && MONTH(Table1[Date])=MONTH(TODAY())))
 
profit.PNG
 
The total of Previous period profit displaying from 7/1/2018 to 7/31/2018 i.e, $412025.00 but I need to correct the profit to display as 7/1/2018 to 7/28/2018 i.e, the profit is $37300.13.
 
Thanks,
Arvind
12 REPLIES 12
v-xicai
Community Support
Community Support

Hi @arvindyadav ,

 

You can try to create a measure like DAX below.

 

Previous Period Profit = CALCULATE(SUM(Table1[Profit]),DATEADD(Table1[Date],-12,MONTH))

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Hi @v-xicai ,

 

Can you please read the Message once again I have made changes. your Dax is not works for me.

The result I am getting after applying your measure is:

 

profit.PNG

Hi @v-xicai,

 

Any update on this?

 

Thanks,

Arvind

Hi @arvindyadav 

 

Can you provide a file with some sample data? That could help better understanding the situation

Hi @Geradav ,

 

Please find the link of sample data.

 

Sample Data

 

Thanks,

Arvind

Hi @arvindyadav 

 

Does that correspond to what you are looking for?

Annotation 2019-08-05 212829.jpg

Hi @Geradav ,

 

Now I am getting total value perfect but date wise value is incorrect.

Please find attached.

profit.PNG

Hi @arvindyadav 

 

Not sure to understand you correctly.

Which part of your visual is not showing you the right result? And what result would you expect?

Hi @Geradav ,

 

If you see your Image and mine Image only total of previous month matching but the individual date profit not matching where the dataset is the same.

 

Thanks,

Arvind

@arvindyadav 

Maybe you send me your file with the DAX statement at david@fumastra.com

Hi @Geradav ,

 

The problem is when I select date range day before yesterdays the data showing me the correct value but when I select date range till yesterdays the total value shows me the entire profit of a previous period month. 

Hi @Geradav ,

 

Have you got any solution?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors