Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
admin11
Memorable Member
Memorable Member

what is the expression for BRAND_M ?

Hi All

 

May i know what is the expression to get BRAND_M ?

admin11_0-1640614168139.png

 

Paul

1 ACCEPTED SOLUTION

You can try with new calculated column:

 

BRAND_M = 'SALES'[BRAND_C] & 'SALES'[BRAND_5]




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

11 REPLIES 11
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on the Sales column and click on "Unpivot other columns".  Remove the Attribute column.  Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur 

Can you take a look for my post below ? As i have been struggle with this question for quite some time and unable to find solution.

https://community.powerbi.com/t5/Desktop/How-to-make-use-of-one-table-to-replace-3-table/td-p/225667...

 

 

@Ashish_Mathur 

 

Thank you for sharing.

 

I cannot do the merge column at PQ , because below field is not appear at PQ.

 

BRAND_C =
IF ( 'SALES'[BRAND] = Blank(),
"No Brand",if(SALES[BRAND] in
{"HMS","HAKKO","BECKHOFF","EMERSON","MITSUBISHI","MSA","REDLION","UNIVERSAL","GE","PROJECT","NON ","INTERNAL ","ROBOTIQ"},
'SALES'[BRAND], "Other"))
 
Using DAX is working fine :- 
BRAND_M = 'SALES'[BRAND_C] & 'SALES'[BRAND_5]
 
Paul
 
ALLUREAN
Solution Sage
Solution Sage

Hi @admin11 

 

You can try with merge columns in Power Query

 

https://www.dropbox.com/s/9efvupzvxtl5swn/BRAND_M.pbix?dl=0

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




@ALLUREAN 

Thank you for sharing. 

I am unable open your file , as my PBI is older version. 

By the way i try to use PQ for my issue is the 2 column i wanted to merge . one of the column not appear at PQ , due to it is a expression :-

BRAND_C =
IF ( 'SALES'[BRAND] = Blank(),
"No Brand",if(SALES[BRAND] in
{"HMS","HAKKO","BECKHOFF","EMERSON","MITSUBISHI","MSA","REDLION","UNIVERSAL","GE","PROJECT","NON ","INTERNAL ","ROBOTIQ"},
'SALES'[BRAND], "Other"))
 
Another column is appear at PQ , field name BRAND_5
admin11_0-1640615866255.png

 

May i know what is the work around ?

 

Paul

If understand properly, this is a calulated column using DAX? In this case you can do the same condition in PQ and then merge both columns?




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




@ALLUREAN 

You are right BRAND_C is calculate column using DAX.

Since Calculate column not appear in PQ . 

it is possible to make use of DAX code to merge these 2 field ?

 

Paul

You can try with new calculated column:

 

BRAND_M = 'SALES'[BRAND_C] & 'SALES'[BRAND_5]




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




@ALLUREAN 

Thank you very much , it work fine now

Greg_Deckler
Super User
Super User

@admin11 So generally something like MAX('Table'[BRAND_M]) but not entirely clear on what you are looking to achieve. 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.