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
Vishalsurve7
New Member

Dax

  • Create measure to sum of all previous april month value from value column  before any selected date(reportdate) in slicer..

Note- report date column is like only last two date for each month per year is present there , and last date of each month is in GBP and second last date is in EUR

For example -   report date         value   currency

                           30-jan-2020       100       EUR

                           31-jan-2020       200       GBP

                           28-feb-2020       400       EUR

                           29-feb-2020       900        GBP

                          .....

                           30-dec-2020      1500       EUR

                           31-dec-2020      1900        GBP

                            30-jan-2021      2200

3 REPLIES 3
Anonymous
Not applicable

Hi @Vishalsurve7 ,

Whether your problem has been resolved? If no, could you please provide your expected result base on your provided sample data?


For example -   report date         value   currency

                           30-jan-2020       100       EUR

                           31-jan-2020       200       GBP

                           28-feb-2020       400       EUR

                           29-feb-2020       900        GBP

                          .....

                           30-dec-2020      1500       EUR

                           31-dec-2020      1900        GBP

                            30-jan-2021      2200


Best Regards

Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Daniel29195
Super User
Super User

@Vishalsurve7 

 

i suppose first , you should convert your values to one currency .  create a cluclated column for this 

you can convert GBP to euro or vise versa. 

 

now , you can use this new column for the measure to caluclate the sum . 

 

from my understanding, you want to calculate the sum(values) , for all april , before the month-year selected from a slicer, 

 

so if you select  2023-07 , thus you want to calculate the sum(values) for 2023-4,  2022-04, 2021-04 ,... .

if that is the case , use the following measure : 

 

 

measure = 

var mdate =  max(tbl_name[date_col_name])a

 

var ds_date = 

filter(

calculatetable( 

values(tbl_name[date_col_name]), 

removefilters(tbl_name[date_col_name]), 

tbl_name[date_col_name] <= mdate 
),

year(table_name[date_col_name]) <= year(mdate ) && month(table_name[date_col_name]) = 4 

)

return

calculate ( 

sum(tbl_name[value_col_name]) , 

removefilters( tbl_name[date_col_name]) , 

ds_date
)

NB : replace the table_name and column names with the respective names from your model . 

 

 

 

let me know if this helps .

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

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