Forum Discussion
afk
8 years agoAdvocate II
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...
- 8 years ago
HI afk
Try this MEASURE
Measure = SUMX ( ALLSELECTED ( Table1[Date] ), CALCULATE ( FIRSTNONBLANK ( Table1[Visits], 1 ) ) ) - 8 years ago
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] ) )
Zubair_Muhammad
8 years agoCommunity Champion
Zubair_Muhammad
8 years agoCommunity Champion
Since you are saying that page visits are duplicated across rows, I take any one value for a particular Date for each ID.
And then sum this value across all dates
You can take MAX, MIN or average as well....if the VALUES are same across products for one ID on each date
- afk8 years agoAdvocate II
Hi Zubair_Muhammad,
Thanks for the explanation. Whilst the count fo URL1 is correct, the grand total should be 2200 (1100 + 1100).
Can this be done?
Apologies for any confusion.
- Zubair_Muhammad8 years agoCommunity Champion
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] ) )- Zubair_Muhammad8 years agoCommunity Champion