mmm, er lijkt inderdaad iets mis te gaan met celverwijzingen.GRDavies75 schreef op vrijdag 25 november 2022 @ 10:02:
Misschien is het handiger om je formules dan hier neer te zetten, dat praat stukken makkelijker.
Maar mijn initiële verwachting is, dat jouw probleem met celverwijzingen (bijv A2 oid) te maken heeft. Misschien heb je de verwijzing gefixeerd? Dus bijvoorbeeld je range was A2:D10 en dat heb je geschreven als $A$2:$D$10.
Dat terwijl PowerQuery altijd een Tabel teruggeeft en kan je (mits mogelijk) beter werken met Tabelverwijzingen (bijv TabelNaam[Kolomnaam]). Tabellen hebben als voordeel dat de range van een tabel automagisch meegroeit.
Edit: Wat ik me ook besef is dat je F9 gebruikt om je formules te verversen? Normaliter worden formules automatisch bijgewerkt als er ergens in de keten waardes veranderen. Dit kan je inderdaad uitzetten en moet je wel via F9 de formule(resultaten) bijwerken. Dit doet men vaak voor als de berekeningen heel intensief zijn (bij hele grote sheets aan data en veel volatile formules). Heb jij dit uitgezet? Zo niet, dan wordt het scenario van 'foutieve' verwijzingen (niet conform verwachting) alleen maar aannemelijker.
de query op sheet 2:
code:
1
| =IF(ISBLANK(Source!A2);IF(COUNTIF(A1;"*description*");CONCAT(" </NadClients>";" <TagDictionaries>";" <TagDictionary allowMultiple=""true"" mandatory=""false"" dataType=""String"" attributeName=""Location"" entityName=""Device""/>";;" <TagDictionary allowMultiple=""true"" mandatory=""false"" dataType=""String"" attributeName=""sysLocation"" entityName=""Device""/>";;" <TagDictionary allowMultiple=""true"" mandatory=""false"" dataType=""String"" attributeName=""LocationID"" entityName=""Device""/>";" </TagDictionaries>";" </TipsContents>");"");IF(Source!$G$2="";"MISSING SHARED SECRET";CONCAT(" <NadClient description="""" name=""[";Source[@LocationID];"] ";SUBSTITUTE(TRIM(CLEAN(StripAccent(Source[@LocationName])));" (Beo)";"");"""";" coaPort=""3799"" radsecEnabled=""false"" coaCapable=""true"" vendorName=""Meraki"" tacacsSecret=""";Source!$G$2;""" radiusSecret=""";Source!$G$2;""" ipAddress=""";Source!C27;"/";32-LEN(SUBSTITUTE(TEXT(DEC2BIN(MID(Source[@MgmtNetmask];1;FIND(".";Source[@MgmtNetmask])-1));"00000000")&TEXT(DEC2BIN(MID(Source[@MgmtNetmask];1+FIND(".";Source[@MgmtNetmask]);FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask])+1)-FIND(".";Source[@MgmtNetmask])-1));"00000000")&TEXT(DEC2BIN(MID(Source[@MgmtNetmask];1+FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask])+1);FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask])+1)+1)-FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask])+1)-1));"00000000")&TEXT(DEC2BIN(RIGHT(Source[@MgmtNetmask];LEN(Source[@MgmtNetmask])-FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask];FIND(".";Source[@MgmtNetmask])+1)+1)));"00000000");"1";""));"""";" <NadClientTags tagName=""Location"" tagValue=""";SUBSTITUTE(TRIM(CLEAN(StripAccent(Source[@LocationName])));" (Beo)";"");"""/>""";" <NadClientTags tagName=""LocationID"" tagValue=""[";Source[@LocationID];"]""/> </NadClient>"))) |
de query op sheet 3:
code:
1
| =IF(ISBLANK(Source!A2);"";CONCAT("[";Source[@LocationID];"] ";SUBSTITUTE(TRIM(CLEAN(StripAccent(Source[@LocationName])));" (Beo)";""))) |
Sheet 1: Source
Sheet 2: devices
Sheet 3: options
Die van sheet 3 is misschien het makkelijkst om te beoordelen wat ik fout doe?
Troubleshooting
- Source tabel is eindigt op lijn 355
formule in sheet 3 lijn 355 matched en checked Source!A355:
code:1
=IF(ISBLANK(Source!A355);"";CONCAT("[";Source[@LocationID];"] ";SUBSTITUTE(TRIM(CLEAN(StripAccent(Source[@LocationName])));" (Beo)";""))) - CTRL-ALT-F5 pulled extra info in die source tabel die nu naar 370 lijnen groeit.
- mm, hier is iets fout.. formule in sheet 3 lijn 355 gaat nu ineens in Source!A370 kijken?!
code:1
=IF(ISBLANK(Source!A370);"";CONCAT("[";Source[@LocationID];"] ";SUBSTITUTE(TRIM(CLEAN(StripAccent(Source[@LocationName])));" (Beo)";"")))
Source!A2: foutieve waardes, maar overflow is netjes blanco ("")
:fill(white):strip_exif()/f/image/CX6L03PGFGwfOZLmpELbYpN0.png?f=user_large)
Source[@LocationID]: correcte waardes, maar callen 371 t/m 1000 geven nu value errors.
:fill(white):strip_exif()/f/image/uHIV5qPeAmXeM6YuqQGmuYhG.png?f=user_large)
Iemand een idee hoe ik dat kan fixen?
[ Voor 9% gewijzigd door witchdoc op 25-11-2022 17:47 ]