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
Anonymous
Not applicable

Create a table

Hello everybody, I have a table in Power BI and I have created the following visualization. As you can see there 6893 articles, some of them are only C (Costruction), some of them are only I (Industry) and some are C+I (mixt). I would like to create a column saying only C, only I or Mixt. How can I do it? directly in the table or in the visualization. Thank you for your help

2021-01-22 18_15_27-Clipboard.png

1 ACCEPTED SOLUTION
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you can create a calculated table as follows.

My test table:

v-yuaj-msft_0-1611557475587.png

 

Table =

var x1=SUMMARIZE('Sheet4',Sheet4[cod_art],"count",DISTINCTCOUNT('Sheet4'[Column]))

return

ADDCOLUMNS(x1,"category",IF([count]=2,"Mixt","Only"&" "&LOOKUPVALUE('Sheet4'[Column],Sheet4[cod_art],[cod_art])))

 

Result:

v-yuaj-msft_1-1611557475591.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you can create a calculated table as follows.

My test table:

v-yuaj-msft_0-1611557475587.png

 

Table =

var x1=SUMMARIZE('Sheet4',Sheet4[cod_art],"count",DISTINCTCOUNT('Sheet4'[Column]))

return

ADDCOLUMNS(x1,"category",IF([count]=2,"Mixt","Only"&" "&LOOKUPVALUE('Sheet4'[Column],Sheet4[cod_art],[cod_art])))

 

Result:

v-yuaj-msft_1-1611557475591.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

iXpert_info
Helper II
Helper II

Hey @Anonymous 

You can create a calculated column with below formula

Column = IF('Table (4)'[C]=1,IF('Table (4)'[I]=1,"Mixt","C"),"I")

 
Did I answer your question? Please mark this as solution

Best Regards
Jay Patel
iXpert Analytics

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.