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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HowardFrazier76
Frequent Visitor

Excel to DAX: converting SUMIFS structured references

I am trying to convert a SUMIFS excel statment to DAX 

 

I have 

 

=SUMIFS(mast[PHTUTS],mast[PHPSTF],"10")+SUMIFS(mast[PHTUTS],mast[PHPSTF],"11") and I am tying to convert into a DAX statment 

1 ACCEPTED SOLUTION
AilleryO
Memorable Member
Memorable Member

Hi,

 

According to what I can see, if you just create a table on your report with mast[PHPSTF] on the lines, 

and with mast[PHTUTS] in values, you should have the total for each value (10,11...).

 

Otherwise in DAX it will look like :

CALCULATE( SUM(mast[PHTUTS]),mast[PHPSTF]=10) or

CALCULATE( SUM(mast[PHTUTS]),mast[PHPSTF]="10") depending on type (numeric or text).

 

or could be :

CALCULATE( SUM(mast[PHTUTS]),mast[PHPSTF] IN {10,11})

 

Hope it helps

View solution in original post

2 REPLIES 2
HowardFrazier76
Frequent Visitor

Thanks 

 

AilleryO
Memorable Member
Memorable Member

Hi,

 

According to what I can see, if you just create a table on your report with mast[PHPSTF] on the lines, 

and with mast[PHTUTS] in values, you should have the total for each value (10,11...).

 

Otherwise in DAX it will look like :

CALCULATE( SUM(mast[PHTUTS]),mast[PHPSTF]=10) or

CALCULATE( SUM(mast[PHTUTS]),mast[PHPSTF]="10") depending on type (numeric or text).

 

or could be :

CALCULATE( SUM(mast[PHTUTS]),mast[PHPSTF] IN {10,11})

 

Hope it helps

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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