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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
jaypatel
Helper III
Helper III

Show selected value in Card instead of Blank

All,

I was working with sync slicers (i.e. global slicer for all pages in the entire report) in Power BI. I was filtering data based on the slicers. Due to the blank value, I cannot get the selected slicer data into the card value. As an example, I've added a Card to display chosen values in the header.
But there is no data; it is showing "(Blank)," but I want to show a selected value in the card.
Please see the attached screenshots for further information where I have added a page-level filter to "Page 1" and am choosing a value from the "Selection" page.Selection Page - Global SlicerSelection Page - Global Slicer

 

Page1-Screenshot 2023-01-02 110534.jpg

 

 

Download the PBIX file from the attached link : Selection.pbix 

5 REPLIES 5
TomMartens
Super User
Super User

Hey @jaypatel ,

 

this will not work, you need a proper star schema, as you are using a page filter.

For this reason "Family4" will be filtered out, meaning you can not extract the selected item from synched slicer.

As long as Name and Title are in the same table your Card visual will always be blank: This si due to a concept called AutoExist. I recommend reading this article: Understanding DAX Auto-Exist - SQLBI

Regards,

Tom

ily and Item



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
TomMartens
Super User
Super User

Hey @jaypatel ,

I always use a measure to visualze selections from a slicer in combination with a card visual. This is the DAX measure: 

vizAid SelectedColorName = 
IF( ISFILTERED( 'DimProduct'[ColorName] )
    , CONCATENATEX(
        VALUES( DimProduct[ColorName] )
        , [ColorName]
        , ", "
        , [ColorName]
        , ASC
    )
    , "No colors selected (ALL)"
)

 The next picture shows the result, if no color is filtered (left), and if multiple colors are filtered (right)
image.png
Please be aware that this does not replace the synch of slicers.

Hopefully, this provides a new idea on how to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

@TomMartens  I have attached a .pbix file for reference.

Mahesh0016
Solution Sage
Solution Sage

@jaypatel ,

>> Measure = IF(SELECTEDVALUE(Card[Column])=Blank(),SELECTEDVALUE(Slicer[Column]))

** I hope this post helps you.
**If this post helps, please consider accept as solution to help other members find it more quickly and Appreciate your Kudos.


 

@Mahesh0016  I have attached a .pbix file for reference. 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors