Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |