Forum Discussion
Default value on Visual Card
- 11 months ago
Hey AllanBerces ,
You can use nested SELECTEDVALUE, or some SWITCH, IFs:
BridgePick = SELECTEDVALUE ( 'Bridge'[Bridge], SELECTEDVALUE ( 'POB_PLAN&ACTUAL'[Bridge], "Default" ) )SELECTEDVALUE is great here, because if there's more than value for particular column, it's gonna return BLANK, therefore calling fallback value.
- 11 months ago
Hi AllanBerces
I believe this could be done by checking if any value is selected in the slicer
We can have a measure for that such as:
IsBridgeSelected = IF( ISFILTERED(Bridge[BridgeColumn]), // Replace BridgeColumn by your actual bridge key/column 1, 0 )Then accordingly we can create the measure to be used within the table
CardValue = IF( [IsBridgeSelected] = 1, CALCULATE( SUM(POB_PLAN[Value]), POB_PLAN[Week] = [CurrentWeek] ), CALCULATE( SUM(POB_PLAN&ACTUAL[Value]), POB_PLAN&ACTUAL[Week] = [CurrentWeek] ) )Adjust the actual column names based on the desired measures, you could also have the selected value as a variable to check if the anything is selected within the slicer and then use the measure within the card visual. Please provide more context if this doesnt help.
- 11 months ago
Use a measure like this:
Card Value =
VAR Sel = SELECTEDVALUE(Bridge[Bridge])
RETURN
IF (
ISBLANK(Sel),
CALCULATE([Your Measure], ALL(Bridge), POB_PLANACTUAL),
[Your Measure]
)
If slicer has A/B/C → show that.
If slicer is blank → default to POB_PLANACTUAL.
Use a measure like this:
Card Value =
VAR Sel = SELECTEDVALUE(Bridge[Bridge])
RETURN
IF (
ISBLANK(Sel),
CALCULATE([Your Measure], ALL(Bridge), POB_PLANACTUAL),
[Your Measure]
)
If slicer has A/B/C → show that.
If slicer is blank → default to POB_PLANACTUAL.