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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Equivalence between Excel and Dax to create a matrix expression

Hello ,

 

In Excel to count with condition under Excel it's possible to use a "matrix expression" .

 

For example with min , max , average , sum :

 

{=MIN(IF(column_A=field_on_colulm_A;column_to_find_min_value))}

{=MAX(IF(column_A=field_on_colulm_A;column_to_find_min_value))}

{=SUM(IF(column_A=field_on_colulm_A;column_to_find_min_value))}

{=AVERAGE(IF(column_A=field_on_colulm_A;column_to_find_min_value))}

 

Under DAX I can use this expression :

 

column_created= CALCULATE(sum(my_table[numeric_column]); ALL(my_table) ; my_table[condition_on_column] = "my_condition")

column_created= CALCULATE(max(my_table[numeric_column]); ALL(my_table) ; my_table[condition_on_column] = "my_condition")

column_created= CALCULATE(min(my_table[numeric_column]); ALL(my_table) ; my_table[condition_on_column] = "my_condition")

column_created= CALCULATE(average(my_table[numeric_column]); ALL(my_table) ; my_table[condition_on_column] = "my_condition")

 

On this case if the condition is on the value "ABC" , the mathematic processed is written on all cells of the board.

 

For example if the value is "DEF" , I looks for a solution to see the "sum/min/max/average" of "DEF" , not for "ABC" .

 

Thanks for the help.

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.