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 September 15. Request your voucher.
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
User | Count |
---|---|
55 | |
53 | |
50 | |
48 | |
32 |
User | Count |
---|---|
157 | |
85 | |
69 | |
48 | |
46 |