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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

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 specifc month and year in a slicer, the first tile will reflect all the 'n' measures with data from that month.

Simultanously. the 2nd tile with the similar 'n' measures' ( from the first tile) will reflect data for the previous month and the third tile will reflect its own similar measures but for the 2 months before the current month (selected in the month/year slicer in the beginning).

 

I hope I was able to explain the requirement but, please do let me know if if I need to anything else for for clarity.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may take a look at the following post.

https://community.powerbi.com/t5/Desktop/Split-amp-filter-data-from-one-table-into-multiple-based-on-a/m-p/342042#M153248

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

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.

Anonymous
Not applicable

DataWithSlicers.jpg

If March has been selected, the first tile with 3 measures will show data for March. The 2nd tile with same measures will show data for February and the 3rd tile will show data for January.

 

Please help urgently. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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