Forum Discussion
Columns and Tables not showing up when using IF function
When I use the IF function, no tables or columns are coming up. I've seen through reading forums that trying an aggregate function such as SUM and AVERAGE will solve this, but am unsure how to use those functions and still complete the calculation that I am trying to solve with using the IF function.
When I do use the aggregate functions such as SUM and AVERAGE, the columns and tables do appear.
I am on tight deadline to finish this, so if someone could assist it would be much appreciated.
Thanks!
- Anonymous5 years ago
Anonymous
There is a difference for between column and measure with IF(). For example,Column = IF([Product]=1,True(), False()) Measure = IF(sum([Product])=1, True(), False())
Both return the same results but for measure you would need to add an aggregation expression in front(Sum, Min, Max). Normally this does not mean anything just let you refer to a column value.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- amitchandakSuper User
Anonymous , your need is not clear. You need to use a measure or aggregated column inside measure
- AnonymousNot applicable
The first screenshot is how i am hoping the IF function would perform... however it is showing the bottom image instead which gives me no option to utilize the different tables and columns. Does this help? amitchandak
- camargos88Community Champion
Hi Anonymous ,
You need to aggregate the values using aggregate functions like SUM, MAX, MIN...
IF inside the measures expects scalar values.
- AnonymousNot applicable
Anonymous
There is a difference for between column and measure with IF(). For example,Column = IF([Product]=1,True(), False()) Measure = IF(sum([Product])=1, True(), False())
Both return the same results but for measure you would need to add an aggregation expression in front(Sum, Min, Max). Normally this does not mean anything just let you refer to a column value.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.