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

August Carousel

Fabric Community Update - August 2024

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