Forum Discussion

Vanessa250919's avatar
5 years ago
Solved

Filter + divide

Hello I need to create a DAX formula but I can't have a good resutlt .

 

I need to have a SUM with filter divide by Count with filter it's possible ? 

 

Measuretest = CALCULATE(SUM(MASTERTABLE[FNGF_VOLUME_ORG]),MASTERTABLE[FNGF_VOLUME_ORG]<>0 / CALCULATE(COUNT(MASTERTABLE[DAY_DATE]),pivot[FNGF_VOL_ORG]<>0))
  • Vanessa250919 

    Did not get it completely but try this modified version:

    Measuretest =
    
    DIVIDE (
        CALCULATE (
            SUM ( MASTERTABLE[FNGF_VOLUME_ORG] ),
            MASTERTABLE[FNGF_VOLUME_ORG] <> 0
        ),
        CALCULATE ( 
            COUNT ( MASTERTABLE[DAY_DATE] ), 
            pivot[FNGF_VOL_ORG] <> 0 
        )
    )
    

2 Replies

  • Vanessa250919 

    Did not get it completely but try this modified version:

    Measuretest =
    
    DIVIDE (
        CALCULATE (
            SUM ( MASTERTABLE[FNGF_VOLUME_ORG] ),
            MASTERTABLE[FNGF_VOLUME_ORG] <> 0
        ),
        CALCULATE ( 
            COUNT ( MASTERTABLE[DAY_DATE] ), 
            pivot[FNGF_VOL_ORG] <> 0 
        )
    )
    
  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Vanessa250919 Should be possible but not really enough to go on. Are you getting a problem with the formula? Is your relationship between mastertable and pivot present and in the right direction?