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
JAVED
Helper I
Helper I

Filter Data

Hi!

I am new to power bi, I am laging with a problem i have 2 columns one contains Different Products like p1,q2,r1,s6,t4,a4,b5,c8,d9 etc... and in another other column i have cost of that Products now i need to create a new column that should contains only q,r,a,t,c COsts only remaining should display as 0 

i am attaching sample data

 Productscost
 p12
 p26
 q15
 q17
 p19
 t13
 r55
 a44
 a46
 b64
 b63
 q20
 s10
 s16
 c35
 d389
 d5133
 d545
 c385
 c325
1 ACCEPTED SOLUTION

Hi @JAVED,

 

You can create a calculated column below: 

 

Column = IF('Table1'[Products]="p1"|| 'Table1'[Products]="p2"||'Table1'[Products]="a4"||'Table1'[Products]="q2"||'Table1'[Products]="s1"||'Table1'[Products]="c3",'Table1'[cost],0)

 

q7.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
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

6 REPLIES 6
JAVED
Helper I
Helper I

sry it should display only p1,p2,a4,q2,s1,c3 values

Hi @JAVED,

 

You can create a calculated column below: 

 

Column = IF('Table1'[Products]="p1"|| 'Table1'[Products]="p2"||'Table1'[Products]="a4"||'Table1'[Products]="q2"||'Table1'[Products]="s1"||'Table1'[Products]="c3",'Table1'[cost],0)

 

q7.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Can we display last 6 months data in graph even.even thought there is no data for 3 months

Example  i need to diaplay last 6 months data when i write a query it is dispalying data from today to feb-23-2018, But in my data base i don't have may,June,July,Agust data,in the bar graph it is shown only feb ,Mar,apr in bar graph. But i need to display may,june,july names also even it is empty.

Hi @JAVED,

 

This is a different issue from the original one. I would suggest you post a new thread in Power BI desktop forum with some dummy data and clarify corresponding desired results. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-qiuyu-msft

Thanks a lot @v-qiuyu-msft

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.