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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Need some help with writing measures.

I have attached a sample data set I have. I have a reference database that has a column from 2024/01/01 to 2024/12/31 with DS(dayshift) and NS(nightshift), called DateShidt. for example, 20240101DS, 20240101NS,20240102DS and so on. What I wish to achieve is that a meausre that gives me a dateshift range if I give it a BNum. For example, "1" in BNum has a task start date of 2024/02/20 NS and "2" in BNum has a task start date of 2024/02/25 DS. When I give the value 1, it would return me all the shifts between 2024/02/25 DS and 2024/02/20 NS (20240220NS, 20240221DS, 20240221NS, 20240222DS, 20240222NS..... 20240225DS). Is this possible to achieve? Thanks

bwang2_0-1713788097936.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Anonymous
Not applicable

@lbendlin Thanks for your reply! I actually have figured it out just now. I'd like to share my exciment with you, lol 

Anonymous
Not applicable

excitement*

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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