Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Changing measures calculations based on Slicers

Hello Guys,   I need to create  a single Power BI page wtih the following requirement: Three separate tiles that will have similar 'n' measures in all three of them such that when I click on a spe...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Thank you. This was helpful.

     

    I created the measures for Previous month using:

     

    Employees Previous Month = CALCULATE([Total Employees],FILTER(EmpData,
    EmpData[SubmittedDateKey].[Date] >= STARTOFMONTH(PARALLELPERIOD(dCalendar[DimDateKey],-1,MONTH)) &&
    EmpData[SubmittedDateKey].[Date] <= ENDOFMONTH(PARALLELPERIOD(dCalendar[DimDateKey],-1,MONTH))))

     

    Employees 2 MonthsBack= CALCULATE([Total Employees],FILTER(EmpData, 
    EmpData[SubmittedDateKey].[Date] >= STARTOFMONTH(PARALLELPERIOD(dCalendar[DimDateKey],-2,MONTH)) && 
    EmpData[SubmittedDateKey].[Date] <= ENDOFMONTH(PARALLELPERIOD(dCalendar[DimDateKey],-2,MONTH))))

     

    where the dCalendar is date table and

    dCalendar[DimDateKey] refers to the dates in the date table.