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
D3K
Advocate II
Advocate II

Measure which returns distinct values

Hello everyone!

 

Please, help to find the solution and even is it possible to create?

 

I have a few tables: managers, clients (name and type), sales (with region and city of client's branch).

 

I've created the table with list of client's attributes:

Manager

Client

Region

City

Type

 

And I want to create next switcher for implementing it into visualization with Sales, Profit and so on:

 

Switcher Client Attribute =
SWITCH(TRUE();
SELECTEDVALUE('Clients Attribute'[Attribute])="Manager"; xxxxxxxx;
SELECTEDVALUE('Clients Attribute'[Attribute])="Client"; xxxxxxxx;
SELECTEDVALUE('Clients Attribute'[Attribute])="Region"; xxxxxxxx;
SELECTEDVALUE('Clients Attribute'[Attribute])="City"; xxxxxxxx;
SELECTEDVALUE('Clients Attribute'[Attribute])="Type"; xxxxxxxx;
BLANK())
 
What do I need to use instead of "xxxxxxxx" to get a list of distinct values from different tables related on selected switcher value?
 
Any help will be appreciated
 
Thanks a lot!
2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Hi,

 

I don't think it is possible to do what you intend to do.

 

Measures, like your Switcher Client Attribute, cannot return lists unless there is a context. If you have a table with say ClientID and Switcher Client Attribute, it would give the attribute pr ClientID. But having Switcher Client Attribute in a table by itself will only give you one value.

 

regards,

Sturla

@sturlaws


 


But having Switcher Client Attribute in a table by itself will only give you one value.

 

Exactly what I've faced to. Thank you for your answer

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.