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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Card and if statement

image.png


I am trying to display a card saying either "warning" or "all good" based on the count of coursekey. 

I only want it to display warning if one specific coursekey appear more than once. However, the example above gave a warning message instead of all good even though these two coursekey were different. It should only give a warning if  for example coursekey 36 appear twice.

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

Try this measure

 

Meaure 3 =
VAR a =
    COUNT ( CheckforforgottenentriesLastyear[Course Key] )
RETURN
    IF (
        a >= 2,
        "Warning",
        "All Good"
    )

 

Regards,

Harsh Nathani

View solution in original post

4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

Try this measure

 

Meaure 3 =
VAR a =
    COUNT ( CheckforforgottenentriesLastyear[Course Key] )
RETURN
    IF (
        a >= 2,
        "Warning",
        "All Good"
    )

 

Regards,

Harsh Nathani

Anonymous
Not applicable

Hi @harshnathani 

I modified my query during the ETL process and it worked. 

Thank you 🙂

Anonymous
Not applicable

Hi @harshnathani 
It did work and show warning if there is more than 2 entries for from different coursekey

However, what I want is to only show if one coursekey occur twice but I think the DAX you gave me was pretty close to the one I want.  

HI @Anonymous ,

 

Can you share sample data and expected output.

 

Regards,

HN

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.