krynil
krynil

Reputation: 243

Power BI: How to change card value and visibility based on selected slicer value

I am trying to find a way to alter the visibility and value of a card visual based on the value selected in the slicer. The slicer values are A and B and this is what currently happens when the A or B is selected:

Slicer value A:

enter image description here

Slicer value B:

enter image description here

For the first image (slicer A) I would like these cards to be removed entirely (invisible) when A is selected.

For the second image (slicer B) I would like to change the Value 4 card value to be 13% (fixed value) if A is selected in the slicer.


If A is selected:

enter image description here

If B is selected:

enter image description here

Upvotes: 1

Views: 4931

Answers (2)

ECE
ECE

Reputation: 11

My solution was to create a meassure like shown below, and use this value to display on the card.

Total Open Orders = if(calculate(distinctcount('All Plants'[Plant]);allselected('All Plants'[Plant]))=1;SUM(OpenOrders[Total Value]);"N/A")

Upvotes: 1

Mike Honey
Mike Honey

Reputation: 15027

Ref my comments above, I don't understand most of your question.

For the "fixed value" requirement, I would use the DAX SELECTEDVALUE function e.g.

Value 4 = IF ( SELECTEDVALUE ( Table[SlicerColumn] , "" ) = "A" , 0.13 , SUM ( Table[Value 4] ) )

Upvotes: 0

Related Questions