Forum Discussion

NISH72's avatar
NISH72
Helper IV
6 years ago
Solved

How to refer a measure in Sim function

Hi I have the following measure with formula - ( If[ measure 1] ,1,0). I want to sum the total number of '1' for this measure. But when I create a measure with sum function ,it is not showing the following measure in it. Please can someone help me. I can't create a calculated column for the above measure due to circular dependency error. Thanks
  • Hey NISH72 ,

     

    this does not clarify the potential outcome of [measure 1], provide the DAX code for [mesure 1].

    I still assume that using SUMX() will be part of the solution.

     

    Regards,

    Tom

6 Replies

  • Hey NISH72 ,

     

    basically it's not clear what the measure [measure 1] will return ...

    You might look into one of the table iterator functions like SUMX and create a measure like so:

    SUMX(
    	'table' 	//the table to iterate
    	, IF([measure 1] ... //the condition
    	, 1			//true
    	, BLANK() 	//false
    	)
    )

    If this does not help, please create a pbix that contains sample data, upload the file to onedrive or dropbox and share the link.

     

    Don't forget to describe the expected outcome based on your sample data.

     

    Regards,

    Tom

     

    • NISH72's avatar
      NISH72
      Helper IV
      Thank you for your reply. I have the following measure with dax- ( If[ measure 1] ,1,0). I want to create the another measure that would sum the total number of 1 for previous measure.
      Eg
      Measure1 = ( If[ measure] ,1,0)
      Measure2 = sum(measure1)
      But measure2 won't refer measure1 and I can't create a calculated column for measure1 dax due to circular dependency. Thanks
      • TomMartens's avatar
        TomMartens
        Super User

        Hey NISH72 ,

         

        this does not clarify the potential outcome of [measure 1], provide the DAX code for [mesure 1].

        I still assume that using SUMX() will be part of the solution.

         

        Regards,

        Tom