Forum Discussion
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.
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] ) )
7 Replies
- v-frfei-msftCommunity 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.
- OSSHelper III
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
- v-frfei-msftCommunity Support
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] ) )
- Ashish_MathurSuper User
Hi,
Try this measure
=IF(HASONEVALUE(Data[Customer ID]),VALUES(Data[Client]),"All")
Hope this helps.
- OSSHelper III
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.