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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors