The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello All,
I'm having 2 different tables A and B with one common column "Product",I want to create a column in Table-A like Exclude and Include.
Exclude mean if Product in Table-B shouldn't be considered for calculation in Table -A or else it is Include .
For the above condition I created a column like
Excl/Incl=if (Tbl-A[Product] in DISTINCT(Tbl-B[Product]),"Exclude","Include")
For Example if my Tbl-B has 2 Products and Tbl-A has 6 Products my Exclude selection should show count as 4 and include should show 6.
But my condition gives Exclude as 2 and include as 4.
How to sort it out?
Solved! Go to Solution.
Try a new column like this in table1
if(isblank(countx(filter([table2],table1[product]=table2[product]),table2[product])),"Include","Exclude")
Main calculation is
countx(filter([table2],table1[product]=table2[product]),table2[product])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Try a new column like this in table1
if(isblank(countx(filter([table2],table1[product]=table2[product]),table2[product])),"Include","Exclude")
Main calculation is
countx(filter([table2],table1[product]=table2[product]),table2[product])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin