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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jay_patel
Helper IV
Helper IV

Want to calculate total net sales based on country and financial year.

Hello All,

I want a dax to get total net sales based on country and fin-year only, it should not filter rest columns of the same table.i have a below dataset:

CountryMarketing productProduct CodeFin YearNet SalesRequired column-Total Net Sales
Kenyaabc22323-24200300
Kenyaade3523-24100300
Kenyadfg5622-235050
Greecesdf6723-2450110
Greecefgh8923-2460110
Greeceert6522-2370150
Greecejhg4422-2380150

 

the required measure or dax should give result as mentioned in Required column-Total net Sales. note, there are many other columns in the same table but it should not filter those columns except Country and fin-year.

Thanks in advance

1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @jay_patel 

Please try to use below DAX in measure

 

Measure = 
CALCULATE(
    SUM('Table'[Net Sales]),
    ALLEXCEPT('Table','Table'[Country],'Table'[Fin Year]))

 

PijushRoy_0-1711005401464.png

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

View solution in original post

1 REPLY 1
PijushRoy
Super User
Super User

Hi @jay_patel 

Please try to use below DAX in measure

 

Measure = 
CALCULATE(
    SUM('Table'[Net Sales]),
    ALLEXCEPT('Table','Table'[Country],'Table'[Fin Year]))

 

PijushRoy_0-1711005401464.png

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.