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

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.

Highlighted
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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors