Show or hide columns depending on current view

FHLPC
New Member

I checked CONTEXT() and SHOW_IF() resources, but unable to understand or find an example for my case.

I have few hidden columns, that I want to show only in specific views.

For example:
View1 = hide column1
View2 = show column1

How do I combine CONTEXT() and SHOW_IF to show/hide columns, depending on the current view?

Solved Solved
1 3 803
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4
3 REPLIES 3

Steve
Platinum 4
Platinum 4

Thank you, I found your post. This is exactly what I needed:

To hide a column in all views except forms, set the columnโ€™s Show_If to:

CONTEXT("ViewType") = "form"

To hide the column only in form views:

CONTEXT("ViewType") <> "form"

To show only in select specific views but hide in all others:

IN(CONTEXT("View"), LIST("MyTable_Form", "MyTable_Detail"))

Note the use of "View" versus "ViewType" with CONTEXT() in the above.

Thanks!

How can we combine these two expressions into a YES/NO output:

IN(CONTEXT("View"), LIST("Morning", "Afternoon"))
ISBLANK(
    SELECT(PD Log[ID], 
       AND(
           [Student ID]=[_THISROW].[Student ID],
           [Date] = TODAY()
          )
)
)
Top Labels in this Space