Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a question, how can I make this formula in a data table in power Bi?
=IF(COUNTIF(NCN[Lotid],[@LOTID])>0,1,0)
I have a question, how can I make this formula in a data table in power Bi?
=IF(COUNTIF(NCN[Lotid],[@LOTID])>0,1,0)
What I want to do is the following.
A new column containing 1 or 0 according to the conditional.
If the data in the LOTID column in the Anodes table matches the LotID data of the NCNs table, then in the column put a 1
if not
put a 0
Table Anodes Table NCNs
thanks.
Solved! Go to Solution.
Hi,
in Power Query, you have to
merge Anodes with NCNs, in left join mode,
expand the NCNs column in the Anodes query selecting only LotID column
add conditional column in the Anodes query setting if NCNs.LotID = null then 0 else 1
remove NCNs.LotID column
Regards
Lorenzo
Hi @Anonymous ,
Try this:
Lookup = IF(LOOKUPVALUE(myTable2[Column1],myTable2[Column1],myTable1[Column1],0)=0,0,1)
Create a calculated column. If you substitute your tables for myTable2, and myTable1, this will work.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
@Nathaniel_C Thank you very much for your response I found it interesting and another question arose.
I need to add that same calculated column after week of year to the anode table, how can I do it?
Hi,
in Power Query, you have to
merge Anodes with NCNs, in left join mode,
expand the NCNs column in the Anodes query selecting only LotID column
add conditional column in the Anodes query setting if NCNs.LotID = null then 0 else 1
remove NCNs.LotID column
Regards
Lorenzo
@Anonymous thank you very much your answer helped me solve my problem.
User | Count |
---|---|
94 | |
86 | |
78 | |
69 | |
63 |
User | Count |
---|---|
114 | |
99 | |
97 | |
65 | |
59 |