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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Conditional Column to Check Past 2 Weeks Data

Hello,

 

I'm using the latest version of Power BI Desktop Application on Windows 10. I've downloaded data from the web interface but loaded it into the desktop to edit.

 

In my report, I have a simple table visualization that contains (1) field of department name, (2) field of employee full name, and then (3) hours worked data that is organized into columns based off days -- in my case, that is the last two weeks of July data (July 1 through 14). The SQL is setup to just refresh and grab the last 14 days.

 

I would like to add a conditional column to the right of this data that will simply print a "Yes" if the last 14 days of hours worked data have at least something populated in them. For example, if John Doe had worked 0.01 hours every day for the last 14 days, the conditional column created would display "Yes" and if one of those days was 0.00 if would display "No".

 

How would I go about solving this? I'm familiar with how to do something like this in Excel but everthing I've searched for has not been quite what I'm looking for...

1 ACCEPTED SOLUTION
edhans
Super User
Super User

This would probably involve a separate query that you group the data and summarize by the 14 days, then merge back to the main query. But I'd need data so I'm not wasting time mocking something up that isn't right.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 
The idea is you need to create a flag measure for the past 14 days. Then use it as rule in the conditional formatting. If you can provide sample data, this would be easier so I can gave the test pbix with example.

 

 

Paul Zheng _ Community Support Team

 

 

edhans
Super User
Super User

This would probably involve a separate query that you group the data and summarize by the 14 days, then merge back to the main query. But I'd need data so I'm not wasting time mocking something up that isn't right.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.