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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

How to exclude certain row values in dax measure?

Hi,

 

I need to make a measure that includes all rows in a specific column except 2 specific rows or names.

 

formula:

 

LTD Revenue Index vs Budget = CALCULATE(DIVIDE([LTD Rev. Acc. without blanks],[LTD Budget without blanks],BLANK())*100,
 
this below dont work:
ALLEXCEPT('Append table','Append table'[Country]="Canada", "Brazil"))
 
 
 
 
1 ACCEPTED SOLUTION

TestMeasure = CALCULATE(SUM('Table1'[Sales Actual]), Table1[Country] <> "Canada" , Table1[Country] <> "Brazil")
 
is one way to do it.

View solution in original post

5 REPLIES 5
affan
Solution Sage
Solution Sage

Hi @Anonymous 

 

Can you please share some data

 

Regards

Affan

Anonymous
Not applicable

Table1  
CountrySales ActualSales Budget
Denmark150154
Canada13983
USA200165
Brazil3040
France8090

 

 

Could be something like this.

 

Then if i sum this i get 599 in sales actual and sales budget 532

 

but if i want to sum this in a measure while filtering out Brazil and Canada, how can i do this?

it has to be in a dax measure and not using the report, page or visual filter pane.

 

Sales Actual = Calculate(sum(table1,Sales Actual), FILTER.... exclude Brazil and Canada....

TestMeasure = CALCULATE(SUM('Table1'[Sales Actual]), Table1[Country] <> "Canada" , Table1[Country] <> "Brazil")
 
is one way to do it.

I'm trying to do the same thing. I don't have to sum, I just neeed to exclude 2 values without using the sum function. What would be the syntax for that? @HotChilli 

All DAX measures have an aggregation of some type e.g. SUM, MIN

If you are just trying to restrict table entries in a visual you can probably use the filter pane or a slicer

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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