Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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]
)
)
Hi,
Please try something like below.
EVALUATE
TOPN (
10,
SELECTCOLUMNS (
ADDCOLUMNS (
VALUES ( 'Calendar'[DayName] ),
"@Uppercase", UPPER ( 'Calendar'[DayName] )
),
"Uppercase", [@Uppercase]
)
)
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |