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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
OSS
Helper III
Helper III

Filtered result name

Hi Community

I have problem with filtering the data.

My data has customer ID, customer name, customer branch and a number of other dimensions.

I use card visual for displaying these dimensions and I have filters on all of them.

 

When I select definite customer id, visual displays related customer name, branch name and others.  It is ok.

But when nothing is selected, all dimensions returns first one in the list. 

I want do display definite wording "ALL" for all dimensions when nothing is selected. Please help me with formulation.

 

 

1 ACCEPTED SOLUTION

Hi @OSS ,

 

To create three meausre to work on it.

BranhM = 
VAR countrall =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALL ( 'Customer List' ) )
VAR countr =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALLSELECTED ( 'Customer List' ) )
RETURN
    IF ( countr = countrall, "All", MAX ( 'Customer List'[Branch] ) )
Customer NameM = 
VAR countrall =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALL ( 'Customer List' ) )
VAR countr =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALLSELECTED ( 'Customer List' ) )
RETURN
    IF ( countr = countrall, "All", MAX ( 'Customer List'[Customer Name] ) )
RMM = 
VAR countrall =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALL ( 'Customer List' ) )
VAR countr =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALLSELECTED ( 'Customer List' ) )
RETURN
    IF ( countr = countrall, "All", MAX ( 'Customer List'[RM] ) )

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=IF(HASONEVALUE(Data[Customer ID]),VALUES(Data[Client]),"All")

Hope this helps.


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

@Ashish_Mathur Thank you for your response, but unfortunately I have tried this formula and it doesn't return exactly what I am looking for. 

v-frfei-msft
Community Support
Community Support

Hi @OSS ,

 

Could you please share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft  I have uploaded the sample to one drive.

 

https://1drv.ms/u/s!Anq8qDsGb04laQas2uox-rnt5wE?e=GFu9BP

 

I visualise my data with the multiple row card. 

I want to write formula and make first row different untill some filter is applied. Actually I use this visual like one row visual and I want to write "ALL" for all dimensions untill definite filter is applied.

 

May be this is not possible with the multi row card visual. Then please advice me how can I achive this goal.

 

Best Regards

Hi @OSS ,

 

To create three meausre to work on it.

BranhM = 
VAR countrall =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALL ( 'Customer List' ) )
VAR countr =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALLSELECTED ( 'Customer List' ) )
RETURN
    IF ( countr = countrall, "All", MAX ( 'Customer List'[Branch] ) )
Customer NameM = 
VAR countrall =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALL ( 'Customer List' ) )
VAR countr =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALLSELECTED ( 'Customer List' ) )
RETURN
    IF ( countr = countrall, "All", MAX ( 'Customer List'[Customer Name] ) )
RMM = 
VAR countrall =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALL ( 'Customer List' ) )
VAR countr =
    CALCULATE ( COUNTROWS ( 'Customer List' ), ALLSELECTED ( 'Customer List' ) )
RETURN
    IF ( countr = countrall, "All", MAX ( 'Customer List'[RM] ) )

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

dear @v-frfei-msft 

I have one more question related with this issue.

Taking into consideration the same sample, I want to add one another dimension. I want to add  'Country' dimension which ic connected with my main table via 'Branch' dimension. While adding 'Country' it returns the same input for every selection.

 

BranchCountry
New Smyrna Beach (US)US
Saguenay (CA)CA
Amersham (UK)UK
Sweetwater (US)US
Stratford (CA)CA
Neenah (US)US
Chichester (UK)UK
Prairie du Chien (US)US
Vancouver (US)US
Houghton Regis (UK)UK
Snodland (UK)UK
Grand Haven (US)US
Cedar Falls (US)US

 

Thank you very much. It is exactly what I am looking for. 

You are great!

 

Best Regards

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors