Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

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

Unpivot all priority columnsUnpivot 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 measuresCreate measures

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

Best Regards

Rena

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

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

Unpivot all priority columnsUnpivot 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 measuresCreate measures

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

Best Regards

Rena

amitchandak
Super User
Super User

@Anonymous , I think you should unpivot this data

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.