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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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