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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Likhitha
Helper IV
Helper IV

Doubt regarding calcuation w.r.to Lag

Hello All,

I'm having lag column w.r.to month which means if lag is 1 and current month selection is November then my lag month is October,if it is lag 2 then lag month is september...the logic is like this.
And I'm having sales(%) for all months and if I select any lag and month(ex:october month and lag 2)
On graph i want to project lag month (August month sales (%)) on graph
How to achieve this??(Lag selection is dynamic)
IMG_20191202_151754.jpg
 
 
 
 
 
 
 
1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Likhitha ,

I created a sample. Please try and check if it is what you want.

  • Create a measure

 

Measure = 
var a = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Month] = MONTH(TODAY()) - 'Lag'[Lag selection]))
return
IF(ISFILTERED('Lag'[Lag]),a,SUM('Table'[Sales]))

 

2.PNG

Best Regards,

Xue Ding

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

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

View solution in original post

1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @Likhitha ,

I created a sample. Please try and check if it is what you want.

  • Create a measure

 

Measure = 
var a = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Month] = MONTH(TODAY()) - 'Lag'[Lag selection]))
return
IF(ISFILTERED('Lag'[Lag]),a,SUM('Table'[Sales]))

 

2.PNG

Best Regards,

Xue Ding

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

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

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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