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

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.

Reply
ritanoori
Resolver I
Resolver I

How to build a measure if filter is applied

Thanks ALL, I found out how to solve it on youtube

 

Capex Estimate =
VAR Selection = SELECTEDVALUE('Date'[Quarter], "ALL")
Return
Switch(True(),
Selection = "Q1", [Capex Estimate Q1],
Selection = "Q2", [Capex Estimate Q2],
Selection = "Q3", [Capex Estimate Q3],
Selection = "Q4", [Capex Estimate Q4])

 

 

 

Hello,

 

I'm a begginer here and I need help please. I have two tables with budget and actual quarterly numbers for CY and PYs.

I have my quarterInCalendar as filter: e.g Q4-2018

I need to build a measure in a matrix which will show

 

 

 

If Filter quarterInCalendar = Q1-2018 then Estimate XXXX= Q1-2018 Actual+Q2-2018 Budget+Q3-2018 Budget+Q4-2018 Budget.

If Filter quarterInCalendar = Q2-2018 then Estimate XXXX= Q1-2018 Actual+Q2-2018 Actual+Q3-2018 Budget+Q4-2018 Budget.

If Filter quarterInCalendar = Q3-2018 then Estimate XXXX= Q1-2018 Actual+Q2-2018 Actual+Q3-2018 Actual+Q4-2018 Budget.

If Filter quarterInCalendar = Q4-2018 then Estimate XXXX= Q1-2018 Actual+Q2-2018 Actual+Q3-2018 Actual+Q4-2018 Actual.

I need to find away to keep years moving as well along with the filter.

 

Thank you so much in advance.

1 ACCEPTED SOLUTION

Thanks- pls check new pics.

View solution in original post

5 REPLIES 5
MxJ
Frequent Visitor

 

Not sure about the syntax for creating 1 measurement, but I came across a similar problem and did the following:

 

You could create 4 seperate measures for each calculation and create different identical visual for each measure. Than create 4 buttons for Q1, 2, 3 and 4 and bookmark each visual to a button.

 

Measurement1 would be:

Q1-2018 = calculate(sum(actual);Q1-2018) + calculate(sum(budget);Q2-2018) + calculate(sum(budget);Q4-2018) + calculate(sum(budget);Q4-2018)

Baskar
Resident Rockstar
Resident Rockstar

@ritanoori   Can you please share some sample data. It will help us to understand your requirement clearly.

Pls check the picture I shared.

Sorry for this, i can't get it anything from this attached image. 

If possible share some sample data and share the existing measure formula used. 

Datas coming from how many fact tables ?

Filter belongs to the same tables or its coming from dif dimension tables ?

 

Thanks- pls check new pics.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors