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.
I will start by saying we are using an Azure model that i don't have access to change the model to add a calculated column, so i am hoping to figure out a way to do this using a measure as I can create new measures in desktop before publishing to my user group.
I have two columns, one called Producer, the other called Package Type. I want to use a measure (if possible) to combine these two columns in one text string. example below (from excel) where i have combined Producer and Package with a space in between.
Any ideas how to solve?
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, it seems that you want to display all combined producer and package values in a Card visual based on the selections selected in the slicer, right?
If so , please try the following formula to create a measure:
Measure =
VAR _t =
SUMMARIZE ( ALLSELECTED ( 'Table' ), [PACKAGE], [PROCUCER] )
RETURN
CONCATENATEX ( _t, [PROCUCER] & " " & [PACKAGE], " , ", [PROCUCER], ASC )
Here is the final output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, it seems that you want to display all combined producer and package values in a Card visual based on the selections selected in the slicer, right?
If so , please try the following formula to create a measure:
Measure =
VAR _t =
SUMMARIZE ( ALLSELECTED ( 'Table' ), [PACKAGE], [PROCUCER] )
RETURN
CONCATENATEX ( _t, [PROCUCER] & " " & [PACKAGE], " , ", [PROCUCER], ASC )
Here is the final output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous no sure what you mean it returns one value, you have to put other two columns in the visual, and this measure then it will work, otherwise there is no solution for this except adding this as a column in the base model.
Think about, measures are aggregation and if you are not showing at a row-level data, the measure will not show you each value. Try to understand the basics of how it works, and you will get why you are getting one value. Hope it helps.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi,
Drag Producer and Package to a Table visual and write this measure
=min(Data[Producer])&" "&min(Data[Package])
Hope this helps.
Thank you Ashish. This sort of works, but only returns 1 value, I want it to return all values which will be potentially hundreds of records depending on how i apply slicers. Any ideas?
Hi,
I do not understand what you want.
Hi @Anonymous
Try this measure:
CONCATENATE =
CONCATENATE (
FIRSTNONBLANK ( 'Table'[Producer], "" ),
" " & FIRSTNONBLANK ( 'Table'[Package], "" )
)
the output will be as follow:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Thank you Vahid. This also sort of works, but only returns 1 value, I want it to return all values which will be potentially hundreds of records depending on how i apply slicers. Any ideas?
@Anonymous your measure will be:
Concatenate =
COMBINEVALUES(" ", MAX ( Table[Column1] ), MAX ( Table2[Column2] ) )
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thank you Parry2k. This works the same as the above two solutions, but only returns 1 value, I want it to return all values which will be potentially hundreds of records depending on how i apply slicers. Any ideas?
@Anonymous
Can you take a snapshot of your Power BI report and ideal output [or develop it on excel] and share it with us?
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |