cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
darko861
Resolver II
Resolver II

Calculate and filter rows by greater than

Hi Community,

 

I have been going through a file from a Youtuber, please see the link below:

https://www.youtube.com/watch?v=uZ15A13AsHY&list=PLDz00l_jz6zym_YP8ZW11o52niGfCP8pN&index=8

 

 

Page 2 of this file has multiple measures, I have created a new measure called Cal w measure:

CAL w measure = CALCULATE(SUM(Order_Details[Tot sales]),Order_Details[Tot sales]>10000)
 
I want to display each ProductName that has values over 10 000 (e.g. the product Camembert Pierrot has the value 17 295 in column CAL Tot Sales, which I want to be displayed in the column CAL w measure too) unfortunately, it sums all the values into 41 369.50 for the Year 1998 and 10 540.00 for the Year 1997. How can I tweak the code using the Calculate function?
 
I have also tried using this measure:
CAL w measure = CALCULATE(SUM(Order_Details[Tot sales]),FILTER(Order_Details,Order_Details[Tot sales]>10000))
 
But I get the same result.
 
 darko861_0-1621601093370.png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@darko861 Without having downloaded the file, perhaps you need an ALLEXCEPT and specify ProductName.


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@darko861 Without having downloaded the file, perhaps you need an ALLEXCEPT and specify ProductName.


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

CAL w measure = CALCULATE(SUM(Order_Details[Tot sales]),FILTER(ALLEXCEPT(FilteredProductsTable,FilteredProductsTable[ProductName]),[SUM of Total sales]>10000))
 
Yes, this seems to work!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors