Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
How to achieve the SUMIF in DAX. Condition just contains some string.
For example, =SUMIF($C:$C,"*SPARE PART*",$F:$F)
How to Describe this in DAX?
Solved! Go to Solution.
Hi,
According to your description, i create a sample to test:
For example, if you want to sum the values that [String] contains "AB", please try to create this column first:
Column = IF(FIND("AB",'Table'[String],1,0)<>0,1,0)
Then try this measure:
Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Column]=1))
The result shows:
Above is the function By DAX like the SUMIF in Excel.
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Hi,
According to your description, i create a sample to test:
For example, if you want to sum the values that [String] contains "AB", please try to create this column first:
Column = IF(FIND("AB",'Table'[String],1,0)<>0,1,0)
Then try this measure:
Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Column]=1))
The result shows:
Above is the function By DAX like the SUMIF in Excel.
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Hey @Schwinn123 ,
you can use a measure like this:
SUMX(
VALUES('<tablename>'[name of the column in C])
, IF(
FIND(...)
, CALCULATE(SUM('<tablename>'[name of the column in F]))
, BLANK()
)
Here you will find an explanation to all the DAX functions: https://dax.guide/
Hopefully, this gets you started.
Regards,
Tom
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
88 | |
82 | |
65 | |
64 | |
58 |
User | Count |
---|---|
171 | |
112 | |
110 | |
72 | |
72 |