Forum Discussion

102938974756545's avatar
102938974756545
Regular Visitor
8 years ago
Solved

How do I label missing data?

  • Two tables involved: Contracts and Contract Evaluations. 
  • One Contract has many evaluations (one each month) 
  • An evaluation can be one of three types - draft final or approved. 

How do I create an artificial fourth label "missing"? As in, there are no evaluations for this contract, sor this month? 

  • Phil_Seamark's avatar
    Phil_Seamark
    8 years ago

    Hi 102938974756545

     

    I added a calculated column to my 'Contracts' table using the following code (I have attached a PBIX file)

     

    Type = 
    VAR x = CALCULATE(MIN('Evaluations'[Type]),RELATEDTABLE('Evaluations'))
    RETURN 
        IF(x="","Missing",x)

    Then dragged the new column to a pie chart twice as follows

     

8 Replies

    • 102938974756545's avatar
      102938974756545
      Regular Visitor

      The end game is a visualisation., let's say a pie graph.

       

      The pie, (100%) shows all the evaluations. There will be four categories. draft final or approved..... and > Missing <.

       

      One slice of the pie is, for example, "3% of evaluations are missing"