cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JAVED Regular Visitor
Regular Visitor

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

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: Filter Data

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 Regular Visitor
Regular Visitor

Re: Filter Data

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

Moderator v-qiuyu-msft
Moderator

Re: Filter Data

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

JAVED Regular Visitor
Regular Visitor

Re: Filter Data

Thanks a lot @v-qiuyu-msft

Highlighted
JAVED Regular Visitor
Regular Visitor

Re: Filter Data

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.

Moderator v-qiuyu-msft
Moderator

Re: Filter Data

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.
JAVED Regular Visitor
Regular Visitor

Re: Filter Data

Thank you @v-qiuyu-msft

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 278 members 3,052 guests
Please welcome our newest community members: