Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Guys.
Looking for some help with measures/calculated columns.
Goal is to come up with a calculation that identifies whether:
From above example, Emp2 had both grade and salary change in Feb-22, but then again, changed salary in Mar-222 but grade remained the same. Emp3 had changes all the 3 months.
Solved! Go to Solution.
@azakir , With help from a date Table
This Month Grade= CALCULATE(Max(Table[Grade]),DATESMTD('Date'[Date]))
Last Month Grade= CALCULATE(Max(Table[Grade]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
This Month Salary= CALCULATE(Max(Table[Salary]),DATESMTD('Date'[Date]))
Last Month Salary= CALCULATE(Max(Table[Salary]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
now create measures like
Changed grade
countx(values(Table[Employee]), if(not(isblank([This Month Grade])) && not(isblank([Last Month Grade])) && [This Month Grade] <> [Last Month Grade], [Employee], blank()))
Do same for salary
A modified approch above, what I discussed in this blog
@azakir , With help from a date Table
This Month Grade= CALCULATE(Max(Table[Grade]),DATESMTD('Date'[Date]))
Last Month Grade= CALCULATE(Max(Table[Grade]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
This Month Salary= CALCULATE(Max(Table[Salary]),DATESMTD('Date'[Date]))
Last Month Salary= CALCULATE(Max(Table[Salary]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
now create measures like
Changed grade
countx(values(Table[Employee]), if(not(isblank([This Month Grade])) && not(isblank([Last Month Grade])) && [This Month Grade] <> [Last Month Grade], [Employee], blank()))
Do same for salary
A modified approch above, what I discussed in this blog
Hi @amitchandak . Thanks for your help mate. This worked a charm. Double Kudos to you if I had the oppurtunity 🙂