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
svc_powerbi
Frequent Visitor

Measure for a manual adjustment for a specific filter

Hi, I am working with datas from different branchs. I developped measures to calculate investments for each branch. There is one of them that I need to add a manual amount in the calculation, so I developped a measure like this, where I need to add 2 597798$ to a particular branch "ADT1" :

 

Ajustement investissement Dix30 = calculate(2597798 ; filter('BI-Branch'; 'BI-Branch'[Branch] = "ADT1" ) ).

 

When I use this measure in a table to validate, this numbers comes for every branches. Any idea how to solve this?

 

2018-08-28 10_42_44-Direction_Executif - Power BI Desktop.png

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @svc_powerbi,

 

The result is expected. The CALCULATE changes the calculation context of its first parameter. Since it's a const value, nothing is changed. The solution could be as follows.

Ajustement investissement Dix30 =
IF ( MIN ( 'BI-Branch'[Branch] ) = "ADT1", 2597798, BLANK () )

Measure_for_a_manual_adjustment_for_a_specific_filter

 

Best Regards,

Dale

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

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @svc_powerbi,

 

The result is expected. The CALCULATE changes the calculation context of its first parameter. Since it's a const value, nothing is changed. The solution could be as follows.

Ajustement investissement Dix30 =
IF ( MIN ( 'BI-Branch'[Branch] ) = "ADT1", 2597798, BLANK () )

Measure_for_a_manual_adjustment_for_a_specific_filter

 

Best Regards,

Dale

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

Thank you so much 

 

Hi @svc_powerbi,

 

It's my pleasure. 

The column is used in a measure where there isn't a Row Context. In other words, the formula doesn't know which row in the column to compare with. There will be only one value of the column when the measure is evaluated in the visualization. So you still can try it with MAX. 

 

Best Regards,

Dale

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

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.