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

measure with specific filter

hi guys,

i have this table: 
table example.png

i need to exclude division "otros negocios" from the table but include the value of this in the measure "varmg1803" but i cant filter this with filter dax and the filter panel exclude the division and the value :S 

varmg1803 measure: 

CALCULATE(DIVIDE([MG%18];[MG%03]);FILTER('Maestro dpto';'Maestro dpto'[División] in {"BELLEZA";"CALZADO Y ACCESORIOS";"DECOHOGAR";"DEPORTE";"ELECTRONICA";"HOMBRE";"INFANTIL";"OTROS NEGOCIOS";"MUJER";"TECNOLOGÍA"}))

MG measure: 
MG%18 = CALCULATE(SUM('Ventas Historico_2003_2019'[Mg_Com]);FILTER(Periodo;Periodo[Año] = "2018"))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try this:

 

NewMeasure =
VAR Selected = SELECTEDVALUE ( 'Maestro dpto'[División] )
RETURN
IF ( Selected <> "OTROS NEGOCIOS"; [varmg1803] )

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Try this:

 

NewMeasure =
VAR Selected = SELECTEDVALUE ( 'Maestro dpto'[División] )
RETURN
IF ( Selected <> "OTROS NEGOCIOS"; [varmg1803] )

Anonymous
Not applicable

hey
try to create a calculated column like this : ( as u see there is a blank for excluded value but its numeric value is still in a table)
scr.png

Greg_Deckler
Super User
Super User

I would use the Filter pane to filter your Otros value and then in the measure, just use ALL to wipe that filter away.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

hi greg ty for your answer but not work :S. use what you told me in the measure but I lost the values ​​of the divisions and the filter panel keeps modifying the value if I exclude the division

varmg.png

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.