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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ashmitp869
Helper II
Helper II

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.