isnotblank with condition

I am looking to a isnotblank() with a condition for a show if expression

I need to combine these 2

isnotblank(question sets[overall Q3]) where [_thisrow].[question set name] = question sets[question set]

im drawing a blank on how to do this, any ideas?

Solved Solved
0 10 266
1 ACCEPTED SOLUTION

I was able to achieve what I needed to have by setting the default value to this

if(
ISNOTBLANK(SELECT(Question Sets[Overall Q2], [_THISROW].[Questions Set] = [Question Set Name])), "", "Blank"
)

And then a show if statement to

and(ISNOTBLANK([Questions Set]), [Overall Q2] <> "Blank")

View solution in original post

10 REPLIES 10

An english description might help more.

But it seems like you are simply trying to see if the [question set name} already exists??  If so then all you need is:

IN([question set name], question sets[question set])   -->  assumes that [question set] is truly the name you wish to match up against

 

Sorry for my short description but here it is.

I have 2 tables , Question Set and Questions

Question Set has a name field and up to 10 questions that can be filled out named Q1 - Q10 

Questions has a a enum that allows you to choose which Question set of questions you want to display.

I only want to display the questions that have been filled out when a person chooses which question set they want. So some question sets will have 5 and other 8 and so on. 

I need a show if statement that will be 

Look at the the question set with the name chosen on questions form and I only want to display the questions that are not blank

So look at the question set where the name is the same and only show the questions that are not blank. 

I have tried

and(isnotblank(questionset[question3]), contains([_thisrow].[questionset] = questionset[questionsetname])

Does that make more sense?

Are your questions in rows or columns?  I assume rows since you mention a table of Questions but then I see "[question3]" in the expression.

I understand your goal but I am not clear on how the questions are "housed" in the QuestionSet table.

Its like this

Question Set Name                Q1                        Q2                     Q3                  Q4

Test Questions               How Are you?    Are you sure?     Really?

So when the user chooses the to use the Test Questions Set I want it to show the 3 questions and hide the 4th so I would need a show if statement for that on the questions form that references the question set

I had a whole thing typed up but then realized I may still not understand.

Ok, so the text of your questions are assigned to the Q1, Q2, Q3 columns.  What kind of view are you trying to show these in? 

I'm guessing a Table view because of the difficulty you are having but then I'm left wondering how you would handle the answers if that was the case.


Sorry for the confusion but here is a restate of what I am trying to do

I have a table named question sets which has these fields

Set Name                 q1                                  q2                             q3                    Q4            General Set        Are you good?       Are you sure?              Really?          ~BLANK~

I now have a form names Employee Review based on the table employee review

Employee    Question Set     Overall Q1    Overall Q2        Overall Q3       Overall Q4

When you choose the question set it changes the name of Overall Q1 - Overall Q10 to whatever is entered for that name in the table question sets. It looks like this

Tragertt_0-1739293822794.png

So you can see the title of the questions have changed to match the question set q1, q2, q3 and q4 title wasn't changed because q4 is blank. What I would like to do now is to now hide Overall q4 question because q4 on table Question Sets is blank. So I need a Show If condition that will hide Overall q4 question because it is blank in the question sets table. I am thinking like this

Isnotblank(question sets(q1) where the [question set] = [_thisrow].[question set]

Does that help clarify? 

 

I'm still not sure I understand but if I do, then for each column, in Show section, have an ISNOTBLANK([same column])

for q1 =>  ISNOTBLANK([q1])

I was able to achieve what I needed to have by setting the default value to this

if(
ISNOTBLANK(SELECT(Question Sets[Overall Q2], [_THISROW].[Questions Set] = [Question Set Name])), "", "Blank"
)

And then a show if statement to

and(ISNOTBLANK([Questions Set]), [Overall Q2] <> "Blank")

Wouldn't the following structure be better: parent table Questions Set [id],[question_set] with a child table Questions [id],[question_set_id],[question]?
This way any question set can have unlimited number of questions and you avoid having unnecessary columns for each question set and also needing to modify the structure for a question addition. 
Can you explain the use case of the app?

ISNOTBLANK(

  LOOKUP(

    "question sets",

    "overall Q3",

    WHERE([question set] = [_thisrow].[question set name])

  )

)

Top Labels in this Space