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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
AlanP514
Post Patron
Post Patron

KPI -Dax

Hi team, 
I need your help to achieve this task:

Requirement:

I have one slicer called source(Which contains different sources and type is text)
Based on that source I created one KPI, a Distinct count of the source

AlanP514_0-1659706626656.png
the actual requirement is :

AlanP514_1-1659706682046.png
If the Source filter is not selected, it should show The KPI which I created (source distinct count)
But if the user selects any one source, it should show the source name which the user selected
Output excepting :
Scenario 1: If the source is not filtered(like the above image) the output describing #source 5(Distinct count of all sources)
Scenario 2: If the source is selected (Eg: From source slicer user selected analytics text value) so in that case instead of shoeing distinct count, it should show the selected source name, so here output is 
Analytics(instead of scenario 1 output)


Thanks 
Alan









 



1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @AlanP514 
Please use

SELECTEDVALUE ( 'Table'[Source], DISTINCTCOUNT ( 'Table'[Source] ) )

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @AlanP514 
Please use

SELECTEDVALUE ( 'Table'[Source], DISTINCTCOUNT ( 'Table'[Source] ) )

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors