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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Wattar
Helper I
Helper I

Help with calculate

Hello,

 

I am trying to calculte a measure using this formula:

Cible N+1 =
VAR ANNEE_N1 = MIN(Effectif0[Année])+1
RETURN
CALCULATE(SUM(SC[Effectif Cible]);'Dim_Années'[Année]== ANNEE_N1)
where ANNEE_N1 = 2021, the calcuation is correct, but the result appears only in front of the year 2020, any ideas why? 
 
 

Capture.PNG

Thank you for help.

4 REPLIES 4
amitchandak
Super User
Super User

@Wattar , try like

Cible N+1 =
VAR ANNEE_N1 = MINX(Effectif0,Effectif0[Année])+1
RETURN
CALCULATE(SUM(SC[Effectif Cible]);'Dim_Années'[Année]== ANNEE_N1)

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

Thanks for you reply, but I get the same result

When I use 2020 instead of the variable it works juts fine

Hi , @Wattar 

The year field in your measure involves multiple tables.Is the "year" field in the matrix visualization a year in the date hierarchy, or is it a field containing only the year?

 

I'm not sure what effect you want to achieve with your measure.

Could you please share your sample data and desired output screenshots for further analysis?

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.