Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Is it possible to change column values using dax measure (no option to modify power query/tranform data option, no option to create a calculated column as Powerbi is connected to AAS live connection)
Such that if I pull an attribute "Sno" on table visual & this measure I should get output as below?
Sno | Existing Field Values | Measure Output Values |
1 | 1 | P1 |
2 | 2 | P2 |
3 | 3 | P3 |
4 | BLANK | Other |
Solved! Go to Solution.
Try this measure:
Output Value =
SWITCH (
MAX ( Table1[Existing Field Values] ),
1, "P1",
2, "P2",
3, "P3",
BLANK (), "Other"
)
Proud to be a Super User!
Try this measure:
Output Value =
SWITCH (
MAX ( Table1[Existing Field Values] ),
1, "P1",
2, "P2",
3, "P3",
BLANK (), "Other"
)
Proud to be a Super User!
I have a related question. I'm currently using a column name called ItemName in tables and charts, but would instead like to use a measure value ShortName:
I would like to replace the ItemName value with ShortName:
ItemName | ShortName |
Product Group Alpha | Alpha |
Product Group Beta | Beta |
Product Group Charlie | Charlie |
Here's what I tried:
The simplest approach is to create a custom column (Power Query) or calculated column (DAX). If neither of these are options, temporarily change your measure to return the first SWITCH argument:
MAX('DimCatalogItemServiceSDD'[ItemName])
It appears there is a value in ItemName that is not in your SWITCH expression (causing it to return "Nada").
Proud to be a Super User!
I appreciate the response. I get what you're saying, but I'm not sure how to modify the measure to return the first result. Can you provide what the full measure would look like based on the above example? Thanks!
Something like this:
Test Measure = MAX ( 'DimCatalogItemServiceSDD'[ItemName] )
You mentioned that you added your measure to a blank table visual. That means there's no filter context (other than external filters) so the max value of ItemName in the entire column (considering external filters) is what gets returned. It's better to create a lookup table than to use DAX.
Proud to be a Super User!
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 |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |