Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I just have started with DAX, and I would create my first measure, but something is wrong.
I have a comment "cannot find name of column".
Could you explain to me why is that?
Solved! Go to Solution.
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?
A really good place to start learning is this free video course:
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
Were you trying to sum the turnover column only where the status of each row equaled REALIZACJA?
If so I think the following is what you want:
CALCULATE(
SUM ( 'EWW 2022'[TURNOVER] ),
'EWW 2022'[STATUS] = "REALIZACJA"
)
CALCULATE lets you add a filter in directly (amoungst other things!) rather than relying on a slicer etc.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |