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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ING_BT
Helper I
Helper I

If selected value (slicer) contains one in a multiple selection - Display text Alerts in cards !

Hello all! 

 

I have created a measure that I use as an "Alert message texte" that I put into a "card" visual. 

 

What it does? It should display the card (with its measure) if the selected country is ONE of the selected countries and the date is in the date range selected (seperate date slicer - calander date table of course). 

I have a market slicer (for example: Italy, France, Germany) 
For each countries I have a different alert message for different dates, they should be displayed if the selected date is anterior to:

France = 2021/02/10

Italy = 2021/06/15

Germany = 2021/05/20

 

Data alert_France =
Var Marketselected = SELECTEDVALUE('Regions&Markets'[UA - Market (D2C)])
return
IF(Marketselected="France | D2C",
IF(
FIRSTDATE(DimDate[Date]) < DATE(2021,02,10),
"France: 17.03.2021"
,""
),"")

 

 
As you can see, this should be working fine, and it does. However, in the case I select several countries, it will not display the alert as the selected value doesn't equal to only France. 
 
How can I write all the possible possibilities of selection: 
France
France + Germany
France + Germany + Italy
France + Italy
...
Imagine I have more than 3 countries (and I do), it's starts being really complicated 🙂 
 
Thank you for your kind help.
 
Best,
BT.
 
1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@ING_BT,

 

Try this solution:

 

1. Sample data:

 

DataInsights_0-1623253829979.png

 

2. Create measure:

 

Data Alert = 
VAR vFirstDate =
    FIRSTDATE ( DimDate[Date] )
VAR vResult =
    CONCATENATEX (
        FactTable,
        IF (
            vFirstDate < FactTable[Alert Date],
            FactTable[Market] & ": " & FactTable[Alert Message]
        ),
        " | "
    )
RETURN
    vResult

 

3. Create visuals:

 

DataInsights_1-1623253860193.png

------------------------------------------------------

 

DataInsights_2-1623253879770.png

 





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@ING_BT,

 

Try this solution:

 

1. Sample data:

 

DataInsights_0-1623253829979.png

 

2. Create measure:

 

Data Alert = 
VAR vFirstDate =
    FIRSTDATE ( DimDate[Date] )
VAR vResult =
    CONCATENATEX (
        FactTable,
        IF (
            vFirstDate < FactTable[Alert Date],
            FactTable[Market] & ": " & FactTable[Alert Message]
        ),
        " | "
    )
RETURN
    vResult

 

3. Create visuals:

 

DataInsights_1-1623253860193.png

------------------------------------------------------

 

DataInsights_2-1623253879770.png

 





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

Proud to be a Super User!




I reproduced your solution and it works perfectly fine !! I tend to forget that I can create tables to ease something like that. 

 

Thank you very much! 

 

Best,

BT

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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