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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jadegirlify
Frequent Visitor

How can I Create A Table Showing Distinct Occurrence Of A Specific Column Values in PowerBI?

Employee_IDFULL_NAMEClearance_Type
101Amy LuSecret
102Joe BoyPolygraph
102Joe BoySecret
103Sam JackConfidential
103Sam JackConfidential
103Sam JackConfidential
104Tom SmithSecret
104Tom SmithConfidential
105Ann WilsonSecret
106Mark BrownSecret
106Mark BrownSecret
107Jane DoePolygraph
107Jane DoeSecret
107Jane DoePolygraph
108Tim BarkConfidential
108Tim BarkSecret
108Tim BarkPolygraph
109May AlecConfidential

 

I Need to create a table visual showing the result below.  I have tried multiple codes but none works. What query/measure should I be using?
Please note that employee_ID 103 & 106 were duplicated, but the clearance type is still only one type "Confidential".

 

Employee_IDFULL_NAMEClearance_Type
101Amy LuSecret
103Sam JackConfidential
105Ann WilsonSecret
106Mark BrownSecret
109May AlecConfidential
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Jadegirlify 

you can try to create a column

Column = if(maxx(FILTER('Table','Table'[Employee_ID]=EARLIER('Table'[Employee_ID])&&('Table'[FULL_NAME]<>EARLIER('Table'[FULL_NAME])||'Table'[Clearance_Type]<>EARLIER('Table'[Clearance_Type]))),'Table'[FULL_NAME])="",1,0)
11.PNG
 
then you add the column to visual filter and set to 1
12.PNG
 
 
or create a measure
 
Measure = if(maxx(FILTER(all('Table'),'Table'[Employee_ID]=max('Table'[Employee_ID])&&('Table'[Clearance_Type]<>max('Table'[Clearance_Type])||'Table'[FULL_NAME]<>max('Table'[FULL_NAME]))),'Table'[FULL_NAME])="",1,0)
 
and add the measure to the visual filter and set to 1
 
13.PNG
 
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
Jadegirlify
Frequent Visitor

This worked! Thanks so much 🙂

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ashish_Mathur
Super User
Super User

Hi,

This measure works

Measure = if(DISTINCTCOUNT(Data[Clearance_Type])=1,MIN(Data[Clearance_Type]),BLANK())

Ashish_Mathur_0-1711076128885.png

 

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks, for some reason. I am getting this error. 

Jadegirlify_0-1711109990595.jpeg

 

You are welcome.  I cannot comment unless i see the file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@Jadegirlify 

you can try to create a column

Column = if(maxx(FILTER('Table','Table'[Employee_ID]=EARLIER('Table'[Employee_ID])&&('Table'[FULL_NAME]<>EARLIER('Table'[FULL_NAME])||'Table'[Clearance_Type]<>EARLIER('Table'[Clearance_Type]))),'Table'[FULL_NAME])="",1,0)
11.PNG
 
then you add the column to visual filter and set to 1
12.PNG
 
 
or create a measure
 
Measure = if(maxx(FILTER(all('Table'),'Table'[Employee_ID]=max('Table'[Employee_ID])&&('Table'[Clearance_Type]<>max('Table'[Clearance_Type])||'Table'[FULL_NAME]<>max('Table'[FULL_NAME]))),'Table'[FULL_NAME])="",1,0)
 
and add the measure to the visual filter and set to 1
 
13.PNG
 
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.