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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Return value to a specific date

Hi Power Bi Community !

 

I have struggled with calculating a variation betwen two specific dates, and I know it should be simple but my formula doesn't work and it drives me crazy !!

My table looks like this, and I've tried this formula (just to return for september 2020) : 

CALCULATE(sum('Table EBITDA'[Actual]),
filter(ALL('Table EBITDA'[Time_Cal]),'Table EBITDA'[Time_Cal]="septembre 2020"))
 
If anyone could help me, would be very much appreciated !!

 

 

CamilleD_0-1605691444314.png

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Modify your measure as below:

 

Measure = CALCULATE(SUM('Table EBITDA'[Actual]),FILTER(ALL('Table EBITDA'),MONTH('Table EBITDA'[Time_Cal])=9&&YEAR('Table EBITDA'[Time_Cal])=2020))

 

Or you may create a slicer table as below:

slicer table = VALUES('Table EBITDA'[Time_Cal])

Then create a measure as below:

Measure 2 = CALCULATE(SUM('Table EBITDA'[Actual]),FILTER(ALL('Table EBITDA'),'Table EBITDA'[Time_Cal]=SELECTEDVALUE('slicer table'[Time_Cal])))

And you will see:

Screenshot 2020-11-25 092150.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi,

Thanks for your reply but still doesn't work, as "September 2020" isn't text but a month !

 

Hi @Anonymous ,

 

Modify your measure as below:

 

Measure = CALCULATE(SUM('Table EBITDA'[Actual]),FILTER(ALL('Table EBITDA'),MONTH('Table EBITDA'[Time_Cal])=9&&YEAR('Table EBITDA'[Time_Cal])=2020))

 

Or you may create a slicer table as below:

slicer table = VALUES('Table EBITDA'[Time_Cal])

Then create a measure as below:

Measure 2 = CALCULATE(SUM('Table EBITDA'[Actual]),FILTER(ALL('Table EBITDA'),'Table EBITDA'[Time_Cal]=SELECTEDVALUE('slicer table'[Time_Cal])))

And you will see:

Screenshot 2020-11-25 092150.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

amitchandak
Super User
Super User

@Anonymous , expected output is not clear. try

CALCULATE(sum('Table EBITDA'[Actual]),
filter(ALL('Table EBITDA'),'Table EBITDA'[Time_Cal]="septembre 2020"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit, 

Thanks for your answer.

I'd like to calculate the sum "Actual" of company A,B and C for september 2020. 

However, when I apply my formula, my visual doesn't show the data. 

I think the problem comes from the formatting of the date but I can't explain the reason...

Any ideas?

 

Hi  @Anonymous,

 

There is an error in your formula,you cant use "ALL('Table EBITDA'[Time_Cal])"and "'Table EBITDA'[Time_Cal]="septembre 2020" in the same filter which is contradictory,you need to modify your measure as below:

Measure = CALCULATE(SUM('Table EBITDA'[Actual]),FILTER(ALL('Table EBITDA'),'Table EBITDA'[Time_Cal]="Septermber 2020"))

 

And you will see:

Screenshot 2020-11-20 095812.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a 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