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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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