Forum Discussion
Help with DAX
- 4 years ago
If you're writing a measure, then you can't refer to a raw column since it doesn't know which values from that column you want are, so you need to use some kind of aggregation.
Assuming there actually is a column named STATUS in the table 'EWW 2022', you can write
IF ( SELECTEDVALUE ( 'EWW 2022'[STATUS] ) = "REALIZACJA", SUM ( 'EWW 2022'[TURNOVER] ) )However, the error message associated with the common DAX mistake above is different.
Are you sure STATUS is actually a column on 'EWW 2022' and not a different table and that there aren't extra spaces or something similar in the name?
If you're writing a measure, then you can't refer to a raw column since it doesn't know which values from that column you want are, so you need to use some kind of aggregation.
Assuming there actually is a column named STATUS in the table 'EWW 2022', you can write
IF (
SELECTEDVALUE ( 'EWW 2022'[STATUS] ) = "REALIZACJA",
SUM ( 'EWW 2022'[TURNOVER] )
)
However, the error message associated with the common DAX mistake above is different.
Are you sure STATUS is actually a column on 'EWW 2022' and not a different table and that there aren't extra spaces or something similar in the name?
Thank you so much for your help!
It was exactly what I needed 🙂
I wanted to start with a simple function, and it turned out that it isn't as easy as I thought