Forum Discussion

sixtoquiles's avatar
sixtoquiles
Helper II
9 years ago
Solved

Help with this...

HI Everyone....   I have this table in my PowerBI (am using direct query) the original table is much bigger, this just a sample,   And i need to create a measure to:             How many Custome...
  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    Ooops,

     

    I cut and paste the wrong measure in

     

    Please try this

     

    Measure2 = IF(
    			HASONEVALUE(
    				'Table1'[Target]
    				),
    				MAX(Table1[Target]),
    				SUMX(
    					SUMMARIZE(
    					'Table1',Table1[Date],Table1[District],
    					"Max Per Day",MAX('Table1'[Target])),[Max Per Day])
    					)
  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    Oh yeah, that's not ideal

     

    Please try this slight tweak  :)

     

    Measure2 = IF(
    				ISFILTERED(
    					'Table1'[Target]
    					),
    					MAX(Table1[Target]),
    					SUMX(
    						SUMMARIZE(
    						'Table1',Table1[Date],Table1[District],
    						"Max Per Day",MAX('Table1'[Target])),[Max Per Day])
    					)