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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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")

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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