Kludged Training Check with If Then, Power Query

jamiers

New Member
Joined
May 20, 2007
Messages
15
Hi All,

I am working on a training table to make sure students complete all of their classes before being promoted into a position. That being said, I have individual columns that that come back with a √ in it if have completed a class. I am running an if/then check to determine if all of the checks are in place, before providing a results.

Basically, the first check is to determine if the position is blank.
  • If it is blank and all the checks AREN'T there, then it should return a result of DONT CARE.
  • If it is blank and all the checks ARE THERE, then it should return a result of ALERT.
  • If it IS NOT BLANK and all the checks ARE THERE, then it should return a SV-Yes.
  • If it IS NOT BLANK and then all the checks AREN'T THERE, then it should return a SV-No
This has been working pretty well until I merged a Level 1 position with the Level 2 position -- all training on the same page and check for two positions on the same page. Basically Level 1 = Worker Bee, Level 2 = Supervisor of the Worker Bee.

What I want to do is change the Comply-SV to first check if the worker's position (the field is [GAP-SH.GAP SH/]) isblank or listed as "SA" in the part of the code that starts off with Comply-SV = if(ISBLANK('!MergedTraining'[GAP-SH.GAP SH/]), I have been looking at this and my brain is just fried. Hoping for some gentle assistance. Thanks... Jamie

Power Query:
Comply-SV = if(ISBLANK('!MergedTraining'[GAP-SH.GAP SH/]),if ('!MergedTraining'[DCSOVRW.DCS Ovr] = "√" && '!MergedTraining'[DCSEIW.EIW] = "√" && '!MergedTraining'[SHFUNDv2.SH Fnd v2 or Sh Fnd 2017] = "√"  && '!MergedTraining'[DEPFUND.Dep Fnd Away or Dep Fnd] = "√"  && '!MergedTraining'[DCSMISCDOVR.Mis Cd Ovr] = "√" && '!MergedTraining'[DCSSHSV.SH SV or SH MGT 2017] = "√" && '!MergedTraining'[BASICFOOD.Bas Food Safty] = "√" && '!MergedTraining'[PFA.PFA] = "√" && '!MergedTraining'[DCSSHRES.SRT in a Sh] = "√" && '!MergedTraining'[DCSSDW.SDW] = "√",  "ALERT", "Dont Care"), if ('!MergedTraining'[DCSOVRW.DCS Ovr] = "√" && '!MergedTraining'[DCSEIW.EIW] = "√" && '!MergedTraining'[SHFUNDv2.SH Fnd v2 or Sh Fnd 2017] = "√"  && '!MergedTraining'[DEPFUND.Dep Fnd Away or Dep Fnd] = "√"  && '!MergedTraining'[DCSMISCDOVR.Mis Cd Ovr] = "√" && '!MergedTraining'[DCSSHSV.SH SV or SH MGT 2017] = "√" && '!MergedTraining'[BASICFOOD.Bas Food Safty] = "√" && '!MergedTraining'[PFA.PFA] = "√" && '!MergedTraining'[DCSSHRES.SRT in a Sh] = "√" && '!MergedTraining'[DCSSDW.SDW] = "√",  "SV-Yes", "SV-No"))
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi,

Try starting your DAX formula with this:
Power Query:
Comply-SV = if(ISBLANK('!MergedTraining'[GAP-SH.GAP SH/])|| LEFT('!MergedTraining'[GAP-SH.GAP SH/],2)="SA",if ('!MergedTraining'[DCSOVRW.DCS Ovr] = "√" && '!MergedTraining'[DCSEIW.EIW] = "√" && '!MergedTraining'[SHFUNDv2.SH Fnd v2 or Sh Fnd 2017] = "√"  && '!MergedTraining'[DEPFUND.Dep Fnd Away or Dep Fnd] = "√"  && '!MergedTraining'[DCSMISCDOVR.Mis Cd Ovr] = "√" && '!MergedTraining'[DCSSHSV.SH SV or SH MGT 2017] = "√" && '!MergedTraining'[BASICFOOD.Bas Food Safty] = "√" && '!MergedTraining'[PFA.PFA] = "√" && '!MergedTraining'[DCSSHRES.SRT in a Sh] = "√" && '!MergedTraining'[DCSSDW.SDW] = "√",  "ALERT", "Dont Care"), if ('!MergedTraining'[DCSOVRW.DCS Ovr] = "√" && '!MergedTraining'[DCSEIW.EIW] = "√" && '!MergedTraining'[SHFUNDv2.SH Fnd v2 or Sh Fnd 2017] = "√"  && '!MergedTraining'[DEPFUND.Dep Fnd Away or Dep Fnd] = "√"  && '!MergedTraining'[DCSMISCDOVR.Mis Cd Ovr] = "√" && '!MergedTraining'[DCSSHSV.SH SV or SH MGT 2017] = "√" && '!MergedTraining'[BASICFOOD.Bas Food Safty] = "√" && '!MergedTraining'[PFA.PFA] = "√" && '!MergedTraining'[DCSSHRES.SRT in a Sh] = "√" && '!MergedTraining'[DCSSDW.SDW] = "√",  "SV-Yes", "SV-No"))
 
Upvote 0
Solution
Hi,

Of course. Within DAX the double ampersand (&&) means AND, the double Pipe (||) means OR.
So basically i added the OR part to the first check within the IF
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,251
Members
453,027
Latest member
Lost_in_spreadsheets

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top