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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.