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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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