Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi, I have table generated by using following DAX
Sub_Table =
VAR _Table =
SUMMARIZE(
[ID],
[Date],
"Values", SUM(Table1[Values])
)
I want to perform following IF operation in the VAR _Table
IF(_Table[Values] <=0, 0, _Table[Values])
And then RETURN an output Table. Any help will be appreciated!
NOTE: I do not mind adding a new conditional column if that makes solution easier.
Solved! Go to Solution.
Hi @Anonymous ,
SUMMARIZE (<table>, <groupBy_columnName>[, <groupBy_columnName>]…[, <name>, <expression>]…)
The first parameter of the SUMMARIZE function should be the table name.
You can think of SUM ( Table1[Values] ) as a whole:
VAR _Table =
SUMMARIZE (
'Table1',
'Table1'[ID],
'Table1'[Date],
"Values", IF ( SUM ( Table1[Values] ) <= 0, 0, SUM ( Table1[Values] ) )
)
If you want to keep [Values] in the virtual table and add a new column.
VAR _Table =
SUMMARIZE (
'Table1',
'Table1'[ID],
'Table1'[Date],
"Values1", SUM ( Table1[Values] ),
"Values2", IF ( SUM ( Table1[Values] ) <= 0, 0, SUM ( Table1[Values] ) )
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @Anonymous ,
SUMMARIZE (<table>, <groupBy_columnName>[, <groupBy_columnName>]…[, <name>, <expression>]…)
The first parameter of the SUMMARIZE function should be the table name.
You can think of SUM ( Table1[Values] ) as a whole:
VAR _Table =
SUMMARIZE (
'Table1',
'Table1'[ID],
'Table1'[Date],
"Values", IF ( SUM ( Table1[Values] ) <= 0, 0, SUM ( Table1[Values] ) )
)
If you want to keep [Values] in the virtual table and add a new column.
VAR _Table =
SUMMARIZE (
'Table1',
'Table1'[ID],
'Table1'[Date],
"Values1", SUM ( Table1[Values] ),
"Values2", IF ( SUM ( Table1[Values] ) <= 0, 0, SUM ( Table1[Values] ) )
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Treat the table like any other. Simply add that column after the table has been created.
Am I missing somthing?
And why the whole VAR / Return thing? Is this part of a larger calculation?
Proud to be a Super User! | |
Yes, it is a part of larger calculation. So, I have to perform this calculation before UNIONize with other tables in same DAX
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.