Forum Discussion
Comparison function with if in Dax
- 9 years ago
I'm using it as a solution:
SUMX (
FILTER (QL2_Alerts, QL2_Alerts[dtt_data_captura] = MAX (QL2_Alerts[dtt_data_captura])),
QL2_Alerts[flt_base])
I do not understand what you're trying to do with these formulas.
TODAY() - 1 will give you yesterday's date. So Column1 will always return "-" because yesterday's date is never greater than today's date.
Your Column2 is an IF statement with 5 arguments. The IF formula takes 3 arguments: IF(<condition to check>, <result if condition is true>, <result if condition is false>)
What does this table even look like? How would you compare one date's value to today's? Is there a date column? I'm not even sure this should be a column. This sounds like the sort of thing that should be a measure but it's very unclear from your examples.
I have three columns.
The Date, Place and Value
I want to compare the Value of yesterday's date d-1 with the value of today's date d0,
to check if there was an increase or decrease between yesterday and today.
In which localities there was increase and which localities had reduction.
| Local | Date | Value |
| Brazil | 20170621 | 174.52 |
| EUA | 20170620 | 157.66 |
| EUA | 20170621 | 487.69 |
| Brazil | 20170620 | 497.65 |
Thanks
- Anonymous9 years agoNot applicable
Do you have a date table?
- sakamotothais9 years agoHelper III
Yes I have
dtt_date 6/20/2017 6/20/2017 6/20/2017 6/20/2017 6/21/2017 6/21/2017 6/21/2017 6/21/2017 - sakamotothais9 years agoHelper III
I want to use a Dax calculation that checks the variance by selecting yesterday's date and today's date in the result, which increased and decreased.