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

IF function for multiple FILTERS

Hi All, I have a requirement to create a new column for the below-given table: Thank you in advance

order NoCust NameY/N?Revenue classAmountNew column
111ABCYApple100Flex
112XYZNApple22Flex
113ABCNApple300Flex
114XYZYOrange66Flex
115DFGNApple667NonFlex
116DDFYOrange567NonFlex
112XYZNMango345Flex
111ABCYMango349Flex

New column = I want the results as flex or nonflex. 

  • The actual requirement is to link flex or non flex for each row based on the "distinct" order number and distinct customer name by column name Y/N?
  • Flex: If column Y/N? equals "Y and N", then it should be Flex for those distinct orders and distinct customers
  • NonFlex" If column Y/N? "Y OR N", then it should be NonFlex for those distinct orders and distinct customers  
2 REPLIES 2
rfigtree
Resolver III
Resolver III

 

 

 

rfigtree_0-1615192557221.png

 

amitchandak
Super User
Super User

@ManjunathaEP , Create a new column like

If(calculate(distinctCOUNT([Y/N?]), filter(Table, [Cust Name] =earlier([Cust Name])))+0=2, "Flex"," NonFlex")



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors