Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Get users counts based on selected priority.

Hi,

I want to know users count based on selected channel priority.

Consider there are 4 filters:  

 

Priority 1Priority 2Priority 3Priority 4
Action DramaComedySci fi 
DramaComedySci fi None
ComedySci fi None 
Sci fi None  
None   

   

User want to know the count of movie audiences based on priority given by audiences. If Priority 1 is Action then action should not come in other priority options. Based on selected priority, User want to know the count of different audiences who are selected.

 

Thanks,

Abhinay

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

    First, you can unpivot these priority columns in Query Editor as suggested by amitchandak.

    Unpivot all priority columns

    Then create measures as below to get the count of movie audiences

    Measure = 
    VAR _a =
        CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ) ) 
    RETURN
        IF ( NOT ( ISBLANK ( _a ) ) && MAX ( 'Table'[Type] ) <> "", _a )
    Measure 2 = SUMX(VALUES('Table'[Type]),[Measure])

    Create measures

    I created a sample pbix file, you can get it from this link.

    Best Regards

    Rena

2 Replies