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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Urgent- Creating new column with value

Hello ,

 

I would like to create a new column which returns only the value for "TDC " which is part of the element of the "KPI" colum.

akerrout_0-1655104463959.png

best regards, 
Kerrout 

1 ACCEPTED SOLUTION

@Anonymous not 100% sure what you mean, but when looking at your sample data, you mean like this?:

 

Column = if('Table'[KPI] = "TDC", 'Table'[% of NNS], 0 )

 

 

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

View solution in original post

6 REPLIES 6
SpartaBI
Community Champion
Community Champion

@Anonymous it's hard to see in the screenshot. Can you share the file/samle data
Also create a pseuodo column of the result you want to get (just enter the values).

Anonymous
Not applicable

KPIPeriod TypeClusterSub-ClusterMarketCategoryBusiness AreaNUMDen% of NNS Pseudo 
TDC2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma7766,07250,044631,05874 31,058
Raw2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma2582,938514,04465,024735 0
Pack2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma0514,04460 0
Purch. 3P2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma-0,9082514,0446-0,00177 0
Var. Man. Exp.2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma4792,603514,04469,323322 0
Purch. 3P IG2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma0514,04460 0
COGS IG2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma7,2656514,04460,014134 0
Exports2022 YTD - 05AimmuneAimmune PPALAimmune PPALPharmaPharma0514,04460 0
Cash Discounts2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma73,56471718,32580,042812 0
Bad Goods Allow.2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma206,16281718,32580,119979 0
Distribution Allow.2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma227,05151718,32580,132135 0
Commission to Cust.2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma01718,32580 0
Consumer Price Reductions2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma634,8361718,32580,36945 0
TTS2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma610,31453396,69040,179679 0
GGLF 3P2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma01718,32580 0
MC2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma926,37011718,32580,539112 0
VDC Tot2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma19,07231718,32580,011099 0
DC2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma32,69541718,32580,019027 0
DC Int2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma27,24621718,32580,015856 0
MGE2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma12635,871718,32587,353594 0
MGE Int2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma12635,871718,32587,353594 0
OGE2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma14864,611718,32588,650634 0
OGE Int2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma11170,031718,32586,500528 0
OP22022 YTD - 05US Total PalforziaPalforzia USPharmaPharma-478371718,3258-27,8393 0
TDC2022 YTD - 05US Total PalforziaPalforzia USPharmaPharma343,93891718,32580,200159 0,200159
Anonymous
Not applicable

Here is the data, i would like to have a column which returns the TDC for each different cluster 

@Anonymous not 100% sure what you mean, but when looking at your sample data, you mean like this?:

 

Column = if('Table'[KPI] = "TDC", 'Table'[% of NNS], 0 )

 

 

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Anonymous
Not applicable

Thanks boss !

@Anonymous 😀 my pleasure 🙂
Hey, check out my showcase report:
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up if you liked it 🙂
 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors