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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Giorgi1989
Advocate II
Advocate II

Applying filter to only some elements of the measure

Dear All,

 

Would appreciate a bit help on this:

 

I am using this formula:

 
  • RM impact Apr 2022 = CALCULATE([RM impact Mar 2022]*(1+([Raw Mat %]*([RM index Apr 2022]/[RM index Mar 2022]-1))),ALL('RM index'[Month]))

I want ALL filter function NOT to apply to the sub-measure [Raw Mat %]. Any smart ways of doing this?

 

Thank you.

 

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Giorgi1989 

 

RM impact Apr 2022 =
	CALCULATE (
	    [RM impact Mar 2022],
	    ALL ( 'RM index'[Month] )
	)
	* ( 1 + ( [Raw Mat %] * CALCULATE( [RM index Apr 2022] / [RM index Mar 2022],ALL ( 'RM index'[Month] )) - 1 ) )

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

View solution in original post

5 REPLIES 5
Giorgi1989
Advocate II
Advocate II

I seem to have resolved the issue I had, largely thanks to you. Many thanks! I will mark this as solved! 

@Giorgi1989 my pleasure 🙂
Hey, check out my showcase report - got some high level stuff there 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂

SpartaBI
Community Champion
Community Champion

@Giorgi1989 

 

RM impact Apr 2022 =
	CALCULATE (
	    [RM impact Mar 2022],
	    ALL ( 'RM index'[Month] )
	)
	* ( 1 + ( [Raw Mat %] * CALCULATE( [RM index Apr 2022] / [RM index Mar 2022],ALL ( 'RM index'[Month] )) - 1 ) )

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Thank you for such a quick reply. 

 

The problem I have with that approach is that that would apply the filter to the [Raw Mat %] measure for priot month.


This is essentially how I have my formulae:

 

RM impact May 2022 = CALCULATE([RM impact Apr 2022]*(1+([Raw Mat %]*([RM index May 2022]/[RM index Apr 2022]-1))),ALL('RM index'))
RM impact Apr 2022 = CALCULATE([RM impact Mar 2022]*(1+([Raw Mat %]*([RM index Apr 2022]/[RM index Mar 2022]-1))),ALL('RM index'))
RM impact Mar 2022 = CALCULATE([RM impact Mar 2022]*(1+([Raw Mat %]*([RM index Mar 2022]/[RM index Feb 2022]-1))),ALL('RM index'))
RM impact Feb 2022 = CALCULATE([RM impact Feb 2022]*(1+([Raw Mat %]*([RM index Feb 2022]/[RM index jan 2022]-1))),ALL('RM index'))
Etc. until Jan 2021. 

@Giorgi1989 hard to understand with the info supplied 🙂
In the version I sent the ALL hits all excpet the measure you wanted to exclude.
Maybe better to share a sample file with the desired results.

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.

Top Solution Authors