Forum Discussion

afk's avatar
afk
Advocate II
8 years ago
Solved

Sum unique values daily

Hi,   I would like to sum the number of visits to a URL, based on unique URLs for each day. An example of the data is as follows.   Date URL Product Visits 01/03/2018 www.url...
  • Zubair_Muhammad's avatar
    8 years ago

    HI afk

     

    Try this MEASURE

     

    Measure =
    SUMX (
        ALLSELECTED ( Table1[Date] ),
        CALCULATE ( FIRSTNONBLANK ( Table1[Visits], 1 ) )
    )
    
  • Zubair_Muhammad's avatar
    8 years ago

    afk

     

    To get figures with correct total...please create another MEASURE which will reference the first MEASURE i.e.

     

    Measure 2 =
    IF (
        HASONEFILTER ( Table1[URL] ),
        [Measure],
        SUMX ( ALLSELECTED ( Table1[URL] ), [Measure] )
    )