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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello! I need to add a "distinctcount" for the session_id in this formula, but I have no luck with it. Is it even possible? Or would I better create a measure instead of a table?
Basically I need to find out how many distinct sessions have 2 or more rows (views) from the "Table_views".
the formula I've used for the table is:
2nd screen view=
Var_Table=
SUMMARIZE(
'Table_views'
'Table_views'[session_id],
"_Count",COUNTROWS('Table_views')
)
RETURN
COUNTROWS(FILTER(_Table,[_Count] >=2))
Hi @MinnieMouse ,
You could try below code:-
Var_Table =
FILTER (
SUMMARIZE (
'Table_views',
'Table_views'[session_id],
"_Count",
COUNTROWS (
FILTER (
'Table_views',
'Table_views'[session_id] = EARLIER ( 'Table_views'[session_id] )
)
)
),
[_Count] >= 2
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thank you for your time! That generates exactly the same output as the formula i've used. I suppose these are distinct session_id as nothing happens when I filter it in the visual! Thanks again!
@MinnieMouse , It would be very helpful to answer if you could share the sample data(not in a screenshot) with expected output.
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin