Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I want to create a measure which will return sum of unique visits and unique visitors based on pagename selected in slicer .
Note - pagename, visits and visitors column are all part of same table .
Solved! Go to Solution.
Hi @Anindita198
According to your needs , I create a sample to return the value you want .
Original data :
Then add a slicer with pagename .
Then create a measure to count sum of unique visits and unique visitors .
Measure =
VAR _VISITORS=DISTINCTCOUNT('Table'[visitors])
VAR _VISITS=DISTINCTCOUNT('Table'[visits])
RETURN _VISITS+_VISITORS
When you choose pagename =page 1,you will get a result like this (unique visitors is 4 and unique visits is 4 , so the sum is 8):
I have attached my pbix file , you can refer to it .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anindita198
According to your needs , I create a sample to return the value you want .
Original data :
Then add a slicer with pagename .
Then create a measure to count sum of unique visits and unique visitors .
Measure =
VAR _VISITORS=DISTINCTCOUNT('Table'[visitors])
VAR _VISITS=DISTINCTCOUNT('Table'[visits])
RETURN _VISITS+_VISITORS
When you choose pagename =page 1,you will get a result like this (unique visitors is 4 and unique visits is 4 , so the sum is 8):
I have attached my pbix file , you can refer to it .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |