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
ashmitp869
Post Partisan
Post Partisan

Help me to build a measures from two different tables from the data model.?

Hi All,

 

How can I calculate a field name Qualified depending on two tables which are marked below.

 

ashmitp869_0-1715317377570.png

 

Measures should be :

Qualified =

CASE WHEN Comments contains "L" then "Learner"

         WHEN Timesheet Date >= Date Start && Timesheet Date <= Date Expiry then "Qualified"

ELSE END AS "Not Qualified"

 

Notes : Multiple rows in DSR_DNQ and mutiple rows in Qualifications Table

 

I am using this business login in measures to defined Qualified :

 

The date_start and date_end are the dates for attending the course. If there is a date_start but no date_end then the course was one day. If the date_end is a few days after the date_start then they are only qualified from the date_end.

 

If there is no date_expiry then they are qualified into the future. If there is a date_expiry then they are only qualified to that date.

 

Thanks

4 REPLIES 4
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...

HI @lbendlin 

I have added a sample file here https://github.com/suvechha/samplepbi/delete/main/sample.pbix 

My requirement is to build a measure in the DSR_DNQ table

Qualified =

CASE WHEN Timesheet Date >=Date Start && Timesheet Date <= Date End Comments contains "L" then "Learner"

         WHEN Timesheet Date >= Date Start && Timesheet Date <= Date Expiry then "Qualified"

         WHEN Timesheet Date >=Date End && Date Expiry = null then "Not Qualified"

         WHEN Timesheet Date < Date Start then "Learner"

 

 

Notes : Multiple rows in DSR_DNQ and mutiple rows in Qualifications Table

 

 

You help will be much appreciated.

Thanks

The link requires access. Please check.

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.