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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
danyeungw
Helper II
Helper II

How to refer to a page filter when creating a column?

I want to create a column that if the use select a single customer from the PAGE filter, the column display the customer name. If the use select multiple or all customers, the column displays "Multiple".  I did the following but it didn't work. I think it was looking for the filter from the current visual. 

 

SelectedCustomer = IF(ISFILTERED(Customer[CustomerName]), Customer[CustomerName], "Multiple")

 

Appreciate you help. Thanks.

 

1 ACCEPTED SOLUTION
v-mengzhu-msft
Community Support
Community Support

Hi @danyeungw ,

 

I do the test and get this result, is this meet your needs?

vmengzhumsft_0-1661927365086.png

vmengzhumsft_1-1661927419631.png

you can try this measure:

Measure = IF(COUNTROWS(VALUES('Table'[custom name]))=1,SELECTEDVALUE('Table'[custom name]),"MUTIPLE")

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-mengzhu-msft
Community Support
Community Support

Hi @danyeungw ,

 

I do the test and get this result, is this meet your needs?

vmengzhumsft_0-1661927365086.png

vmengzhumsft_1-1661927419631.png

you can try this measure:

Measure = IF(COUNTROWS(VALUES('Table'[custom name]))=1,SELECTEDVALUE('Table'[custom name]),"MUTIPLE")

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

danyeungw
Helper II
Helper II

Thanks Arul,
I changed to the following. It always has "Multiple" when I filtered the CustomerName at page level or visual level. 

 

SelectedCustomer = IF(HASONEVALUE(DSTrends[CustomerName]) = TRUE(), SELECTEDVALUE(DSTrends[CustomerName]), "Multiple")

Arul
Super User
Super User

@danyeungw ,

try this,

Customername = IF(HASONEVALUE('Customer Lookup'[customer_first-name]) = TRUE(),SELECTEDVALUE('Customer Lookup'[customer_first-name]),"Multiple")

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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