cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

If any one Value is Yes in one column, then replicate Yes in other column

Hi - 

 

I have a list of accounts, I need to know if a particular account is a Sales Account or not based on the column which is "Sales Account".

 

If any account has one value as "Yes", I would need all Yes in the Yes/ No column. For Eg. - In the screenshot, Verizon has one line item as Yes, so I would require all Yes in the Yes/ No column.

 

Sales Account is an already created measure

ritu24raj_1-1603895804582.png

Note - I am using SSAS >> Live connection w/ cube to Power BI.

1 ACCEPTED SOLUTION

@ritu24raj 

 

So here I created two calculated columns 

1.  Yes/No_Count = if ('Sales Account'[Sales Account]="Yes",1,0)

2. Yes_No_Final = if(CALCULATE(SUM('Sales Account'[Yes/No_Count]),ALLEXCEPT('Sales Account','Sales Account'[Account Name]))>0,"Yes","No")

 

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos


Proud to be a Super User!

Follow me here


View solution in original post

9 REPLIES 9
Super User II
Super User II

@ritu24raj 

 

How are you splitting the rows which have the same ID, Account Name and Sales account values?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrown - They are splited based on the year and quarter and there are few child accounts too. Hope this answers! 

Hi @ritu24raj ,

 

What is the formula of "Sales Account"?

Try this measure:

 

Measure = CALCULATE([Measure 2],ALLEXCEPT('Table','Table'[ID],'Table'[Name]))

 

test_If any one Value is Yes in one column, then replicate Yes in other column.PNG

 

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

Thanks @V-lianl-msft  I tweaked the formula and its running.

 

But thanks for the help 🙂

 

Regards,

Ritu Raj

Super User IV
Super User IV

@ritu24raj , Create a new column

if(countx(filter(Table, [Account Name] = earlier([Account Name]) && [Sales Account] ="Yes"),[Account Name])+0>0, "Yes","No")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Hi @amitchandak - Thanks for this, as I mentioned I am connected to a cube and I cant use the EARLIER function. Additionally, I can only create measures and not columns.

@ritu24raj  I guess without creating a column, it would be difficult to achieve. If you can create a column, below solution would work for you.

 

negi007_0-1603901011377.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos


Proud to be a Super User!

Follow me here


@ritu24raj 

 

So here I created two calculated columns 

1.  Yes/No_Count = if ('Sales Account'[Sales Account]="Yes",1,0)

2. Yes_No_Final = if(CALCULATE(SUM('Sales Account'[Yes/No_Count]),ALLEXCEPT('Sales Account','Sales Account'[Account Name]))>0,"Yes","No")

 

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos


Proud to be a Super User!

Follow me here


View solution in original post

Hi @negi007 - It is not working either

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors