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 all,
I currently have a live connection data in PBI. I have the below column:
Test |
Test1|
Test2|
Test3|
I want to create a MEASURE that can change the values in the above column to:
Hi
Hello
Create
Hey
respectively,
How?
I created a variable and used max (column1) and then applied switch function. When I drag the measure, it shows me only 1 row but I need the rest of the rows to appear.
Please help.
Solved! Go to Solution.
@Omega,
Create the following measure and check if it returns your expected result.
Measure = SWITCH(FIRSTNONBLANK(Table[Column],1),"Test","Hi","Test1","Hello","Test2","Create","Test3","Hey")
Regards,
Lydia
@Omega,
Create the following measure and check if it returns your expected result.
Measure = SWITCH(FIRSTNONBLANK(Table[Column],1),"Test","Hi","Test1","Hello","Test2","Create","Test3","Hey")
Regards,
Lydia
This is not a measure but should do the same.
This works in DirectQuery for me and the Switch function works with calculated column as well even in DirectQuery mode.
Do you have a check mark in File - > Options - > DirectQuery - > "Allow unrestricted measures in DirectQuery mode" ?
If each new value is based on that row's column value, try creating a new column, rather than a new measure.
We can't create new columns in Power BI when there is a live connection. 😞
Can you do the transformation in the Power Query?
If not then it will depend on your model as to the best way to do this? Do you have a lookup table for the changes, or is it a limited number of values?
Unfortunately we can't move to PQuery 😞
The challenge is to create a measure that changes certain text to another. 😄
So how are you getting the data into Power BI now?
Analysis Services (Azure)
You can add simple columns to tables in Direct Query. I haven't tried it with AAS, but I can do it for other SQL sources.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |