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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Etsu0411
Regular Visitor

Need help in writing the DAX

Hi Mates,

 

Can you please help me in decoding the below excel formulae and to write the same as DAX in Power BI

 

=SUMIFS('Sheet1'!$F:$F, 'Sheet1'!$A:$A, B$2, 'Sheet1'!$B:$B, $A4, 'Sheet1'!$E:$E, "Private")

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Etsu0411 ,

 

Approve with @Greg_Deckler . Besides, you can use Calculate(Sum(...),Filter(...)) too.

Based on your description, I have created a simple sample:

vjianbolimsft_0-1664243846313.png

After connect to Power BI:

vjianbolimsft_1-1664244007629.png

 

Here is the DAX:

Measure = SUMX(FILTER('Table',[Column A]="B"&&[Column B]="A"&&[Column E]="Private"),[Column F])

Measure 2 = CALCULATE(SUM('Table'[Column F]),FILTER('Table',[Column A]="B"&&[Column B]="A"&&[Column E]="Private"))

Fianl output:

vjianbolimsft_4-1664244470273.png

 

 

For more details, please refer to:

CALCULATE function (DAX) - DAX | Microsoft Learn

SUMX function (DAX) - DAX | Microsoft Learn

FILTER function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Etsu0411 ,

 

Approve with @Greg_Deckler . Besides, you can use Calculate(Sum(...),Filter(...)) too.

Based on your description, I have created a simple sample:

vjianbolimsft_0-1664243846313.png

After connect to Power BI:

vjianbolimsft_1-1664244007629.png

 

Here is the DAX:

Measure = SUMX(FILTER('Table',[Column A]="B"&&[Column B]="A"&&[Column E]="Private"),[Column F])

Measure 2 = CALCULATE(SUM('Table'[Column F]),FILTER('Table',[Column A]="B"&&[Column B]="A"&&[Column E]="Private"))

Fianl output:

vjianbolimsft_4-1664244470273.png

 

 

For more details, please refer to:

CALCULATE function (DAX) - DAX | Microsoft Learn

SUMX function (DAX) - DAX | Microsoft Learn

FILTER function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@Etsu0411 You can use SUMX(FILTER(...), ...)



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...

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors