Forum Discussion

thmpsne's avatar
thmpsne
Frequent Visitor
6 years ago
Solved

Survey Data - Unpivoting Causing Issues?

Hi everyone,  This is my first time posting so please forgive me if it's rough!  I'm relatively new to PowerBI, and my DAX is very basic. In my role, we are moving toward using PowerBI to present...
  • jdbuchanan71's avatar
    jdbuchanan71
    6 years ago

    thmpsne 

    Just testing againts your sample I created a couple measures.

    Student Count = DISTINCTCOUNT ( 'Table'[Student ID] )
    Industry = 
    CALCULATE( [Student Count],
    'Table'[Question Code] = "example_industry")
    Job Title = 
    CALCULATE( [Student Count],
    'Table'[Question Code] = "example_mainrole - Job Title")

    They work when you apply filters on say the student so it should work with filtering on other columns in your data as well.