Forum Discussion

dofrancis3's avatar
dofrancis3
Icon for Resolver I rankResolver I
2 years ago

Mesure and Calendar table

Hi Colleagues!

I've created a "Calendar" table, but when I try to create a measure, "Calenda table" doesn't appear.

Could you help me to fixe this issue please.

In other words, when I call up "Calenda table" to create a measure, the table is not visible.
Kindly, advise.

Please see the print screen below:

 

 

6 Replies

  • wynhopkins's avatar
    wynhopkins
    Icon for Most Valuable Professional rankMost Valuable Professional

    You can't directly reference a table or column in a measure.  It's got to be wrapped in a function like a SUM, COUNTROWS, CALCULATE.    

    what are you trying to do with the measure

    • dofrancis3's avatar
      dofrancis3
      Icon for Resolver I rankResolver I
      I would like to calculate the pourcentage of status without "blank dates" and pourcentage "include blank dates"
      below is my Mesure: 
      % Status = DIVIDE([NbrPass], [NbrStatus], 'Calendar'[Date] = BLANK())
       
      Knowing that:
      NbrPass = CALCULATE(COUNTROWS(repository),repository[STATUS]= "Pass")
      NbrStatus = CALCULATE(COUNTROWS(repository),repository[STATUS]= "Pass"||repository[STATUS]= "Fail")

       


       

      • wynhopkins's avatar
        wynhopkins
        Icon for Most Valuable Professional rankMost Valuable Professional

        Your Calendar table shouldn't have blank dates so don't reference that.


        Number of records  =  COUNTROWS(repository)     
        Q: is there  status other than pass or fail?

        Blank Dates = CALCULATE( COUNTROWS(repository), ISBLANK(repository[Date Column]) )

        Replace Date Column with whichever column you're checkin in the repository status

        % = DIVIDE( [Blank Dates,  [Number of records])