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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ritu24raj
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
negi007
Community Champion
Community Champion

@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 on linkedin

View solution in original post

9 REPLIES 9
PaulDBrown
Community Champion
Community Champion

@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

amitchandak
Super User
Super User

@ritu24raj , Create a new column

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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 on linkedin

negi007
Community Champion
Community Champion

@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 on linkedin

Hi @negi007 - It is not working either

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.