Forum Discussion

manojk_pbi's avatar
manojk_pbi
Helper V
6 months ago
Solved

Calculated Columns or Measure to get the output

Hello Friends,

 

Please help me to write either DAXm Measure or calculated column in this scenario.

I have provided sample input data and expected output in table. We have one master data & reports data. Both tables linked n PRJID. How can add below columns to the master table using the reports table data.

Required Reports : Count of reports when date value is present in any columns (G0 to G5)
Available Reports : Count of reports available in ReportsTable for the project . Eg: Prj1 we suppose to have 4 entries but only 3 isavailable. G4 is missing
Gates Missing: Prj1 we suppose to have 4 entries but only 3 is available. Missing report is G4
Document Link Missing : Corresponding report entry is present in report table but Doc Link is empty

 

Output table          
PrjIDPrjNameGateG0 DateG2 DateG4 DateG5 DateRequired ReportsAvailable ReportsGates MissingDocument Link Missing
P1Prj1G52-Feb-242-Jun-242-Oct-242-Dec-2443G4G4
P2Prj2G42-Feb-24 2-Dec-24 22 G4
P3Prj3G52-Feb-242-Dec-242-Dec-242-Feb-2530G0,G4,G5G0,G4,G5
P4Prj4G52-Feb-24  2-Feb-2522 G0
P5Prj5G22-Feb-242-Jun-242-Mar-262-Dec-26411 

 

Master Table      
PrjIDPrjNameGateG0 DateG2 DateG4 DateG5 Date
P1Prj1G52-Feb-242-Jun-242-Oct-242-Dec-24
P2Prj2G42-Feb-24 2-Dec-24 
P3Prj3G52-Feb-24

2-Dec-

 

24

2-Dec-242-Feb-25
P4Prj4G52-Feb-24  2-Feb-25
P5Prj5G32-Feb-242-Jun-242-Apr-262-Dec-26

 

ReportsTable   
PrjIDGateLast Gate DateDoc Link
P1G02-Feb-24link
P1G22-Jun-24link
P1G52-Dec-24link
P2G02-Feb-24link
P2G42-Dec-24 
P4G02-Feb-05 
P5G22-Jun-24link
P4G52-Feb-05link

6 Replies

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi manojk_pbi ,

    Thank you for reaching out to Microsoft Community.
    Please review the attached PBIX file, which has been configured to match your stated requirements.

    Best Regards
    Chaithra E.

    • manojk_pbi's avatar
      manojk_pbi
      Helper V

      v-echaithra , Thanks for creating a sample and configuring the required measures. Few are not working as expected.

       

      If I need to present Required Reports, Available Reports count in KPI visual, numbers are not correct. Even the measure is not working properly when we have total in the table. 

      Actually available reports are 8 but table shows 4. It is taking distinct count instead it shuld add up all the values. 

       

      How can we modify to get the sum of all required and available reports

       

       

       

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi manojk_pbi ,

    Thank you for your response. I have adjusted the measure accordingly and hope it now meets your requirements. Please review the attached PBIX file.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi manojk_pbi ,

    We’d like to follow up regarding the recent concern. Kindly confirm whether the issue has been resolved, or if further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

    Thank you.