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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Selecting only the last 7 days that aren't null

Hi All,

 

I have a date table to which all other dates in my model are linked. I'd like to create a calculated column on this date table that simply puts "Yes"/"No" depending on whether a value is blank or not in another column in another table. How is this possible as if I try to an "if" statement I can only select measures in other tables, not normal columns. Thank you for any help.

1 ACCEPTED SOLUTION
FarhanAhmed
Community Champion
Community Champion

Try creating below calculated column on date dimension.

 

CALCULATE( iF(ISBLANK(sum(Table[Sales]) ),"No","Yes"),CROSSFILTER('Date'[Date],Table[Date],Both))






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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
FarhanAhmed
Community Champion
Community Champion

Try creating below calculated column on date dimension.

 

CALCULATE( iF(ISBLANK(sum(Table[Sales]) ),"No","Yes"),CROSSFILTER('Date'[Date],Table[Date],Both))






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

Proud to be a Super User!




Anonymous
Not applicable

@FarhanAhmed  may I also ask how you would modify it so that "Yes" would only be assigned to the last 7 days from the first occurence of data in that other table.

 

i.e. if in your previous DAX expression the last "Yes" was on 15th May then "Yes" would only be assigned to the dates corresponding to 9th - 15th of May, and "No" to all others.

amitchandak
Super User
Super User

@Anonymous , can be done by creating a column in date table. But try like

Create a table

Tab1 =Summarize(Date,Date[Date],"Sum1",sum(Table[A])+sum(Table[B])+sum(Table1[C]))

And then a column in date table

New Column in Date Table = if(isblank(maxx(filter(Tab1, Tab1[Date] =Date[Date]),Tab1[Sum1])),"No","Yes")

 

As long as measure are fine with only date filter which is group by it should work for measure

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.