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
JPBR549
Frequent Visitor

Trying to show a message on a card if there are no new records in last 7 days

Hi all.  I'm new to Power BI and DAX.  I'm working on attempting to use a measure using DAX that displays  the message "No new registrations in the last 7 days" if there are no new registrations in the last 7 days, but not having much success.  The DAX Code I am using is:

 

NoRegistrations = if(ISBLANK(DimCompany[registration_effective_date]>=Today()-7), "No new registrations in the last 7 days","")

 

The error message I am getting is "A single value for column'registration in table 'DimCompany' cannot be determined.  This can hapened when a measure formula refers to a column that contains mny values without specifying an aggregation such as min, max, count, or sum to  get a single result.
 
Thanks in advance for assistance.
1 REPLY 1
JPBR549
Frequent Visitor

I was able to fix the issus using 

New Registrations = IF(ISBLANK(Calculate(Count(DimCompany[Registration_Id]), Filter(DimCompany, DimCompany[registration_effective_date]>=Today()-7))), "No new registrations in the last 7 days","")

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors