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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Rubal
Helper II
Helper II

Show blank card till a slicer is selected

Hi All,

 

Need help with the below scenario.

 

I have a Spend Measure which is visualised in a card. The measure is calculated from two tables. Freight Summary Table has Into restaurant price and Consolidated Spend has Vol in Cases.  Price X Volume = Spend is the formula. Both tables is joined by "Country" field which is set as the slicer. I want the card to be blank until I select a country from the slicer.

 

Spend Measure = SUMX('Freight Summary','Freight Summary'[Into Restaurant Price]* RELATED('Consolidated Spend'[Vol in Cases]))

 

Appreciate the help.

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Rubal 


Try:

Spend Measure = 
IF( HASONEVALUE('Consolidated Spend'[Country]),
    SUMX('Freight Summary','Freight Summary'[Into Restaurant Price]* RELATED('Consolidated Spend'[Vol in Cases])),
    BLANK()
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@Rubal 


Try:

Spend Measure = 
IF( HASONEVALUE('Consolidated Spend'[Country]),
    SUMX('Freight Summary','Freight Summary'[Into Restaurant Price]* RELATED('Consolidated Spend'[Vol in Cases])),
    BLANK()
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

It's Magic. Thank you so much @Fowmy Works like a dream.

amitchandak
Super User
Super User

@Rubal , Something like this

if(isfiltered(Country[Country]),[Spend Measure], blank())

Hi Amit,

 

Thanks for the prompt response. Why do we have (Country[Country]). Shouldnt it be (table name[Column])?

Helpful resources

Announcements
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.