Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello All,
I have this simple DAX line
EVALUATE TOPN(10, VALUES(Calendar[DayName]))
This column is simply Monday, Tuesday, Wednesday, etc.. and I want to change the case to uppercase. But I can't get the correct syntax correct within DAX Studio
I've tried
EVALUATE TOPN(10, VALUES(UPPER(Calendar[DayName])))
which returned an error stating this can happen when a measure formual refers to a column that contains many values....
Not trying to do anything fancy here, just simply play around with functions. What am I missing?
Solved! Go to Solution.
Hi,
Please try something like below.
EVALUATE
TOPN (
10,
SELECTCOLUMNS (
ADDCOLUMNS (
VALUES ( 'Calendar'[DayName] ),
"@Uppercase", UPPER ( 'Calendar'[DayName] )
),
"Uppercase", [@Uppercase]
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
Hi,
Please try something like below.
EVALUATE
TOPN (
10,
SELECTCOLUMNS (
ADDCOLUMNS (
VALUES ( 'Calendar'[DayName] ),
"@Uppercase", UPPER ( 'Calendar'[DayName] )
),
"Uppercase", [@Uppercase]
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This works, can you explain why you have to do
"@Uppercase", UPPER ( 'Calendar'[DayName] )
.. snip ..
),
"Uppercase", [@uppercase]
It looks like we are assiging the value of UPPER(calendar[dayname]) to the variable @uppercase, and then returning it at the end? Is that correct?
And why does the table need single ' around it within the function?
Hi,
Thank you for your feedback.
UPPER(Calendar[DayName]) is an expression.
VALUES () function needs a table or column, not expression.
This is why I decided to select one of table contructor functions in DAX.
I hope this helps.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |