The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
12 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |