Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I have a table with the following columns:
[Tenant_ID] (text),
[Page_ID] (text),
[Pendo_visitor_ID] (text),
[NUM_MINUTES] (general),
[TIMESTAMP] (date/time) ex. 2022-05-18 2:00:00PM
[Pendo_visitor_ID] can only belong to one [Tenant_ID], and I only filter for one [Page_ID] at the visual level.
I am trying to calculate the following:
To calculate 1, I took the following approach. I create a measure to:
This issue I am running into is as soon as I add the => 5 logic, the whole expression evaluates to a blank, if I remove that bit of logic, it correctly calculates the number of distinct users. My code is below for reference:
COUNTX(
FILTER(
ADDCOLUMNS(
SUMMARIZE(
CALCULATETABLE('Active Users', DATESBETWEEN('Active Users'[TIMESTAMP].[Date], MAX('Active Users'[TIMESTAMP].[Date])-45, MAX('Active Users'[TIMESTAMP].[Date]))),
'Active Users'[PENDO_VISITOR_ID]),
"TimestampCount",
CALCULATE(
COUNTROWS(
SUMMARIZE(
CALCULATETABLE('Active Users', DATESBETWEEN('Active Users'[TIMESTAMP].[Date], MAX('Active Users'[TIMESTAMP].[Date])-45, MAX('Active Users'[TIMESTAMP].[Date]))) ,'Active Users'[PENDO_VISITOR_ID]))
,ALLEXCEPT('Active Users','Active Users'[PENDO_VISITOR_ID])))
,[TimestampCount] >= 5)
,1)
Has anyone come across this behaviour before? Note this renders perfectly when I enter a sample date range and push the output into a table. If someone can help with point 2 as well, that would be terrific.
Solved! Go to Solution.
Hi,
Try this approach/patern
log in count = countrows('Active users')
log in count in past 45 days = calculate([log in count],datesbetween('calendar'[date],min('calendar'[date])-44,min('calendar'[date]))
Active users = countrows(filter(values('Active users'[Pendo_Visitor_id]),[log in count in past 45 days]>=5))
Active tenants = countrows(filter(values('Active users'[Tenent_id]),[Active users]>=5)
Hope this helps.
Hi,
Try this approach/patern
log in count = countrows('Active users')
log in count in past 45 days = calculate([log in count],datesbetween('calendar'[date],min('calendar'[date])-44,min('calendar'[date]))
Active users = countrows(filter(values('Active users'[Pendo_Visitor_id]),[log in count in past 45 days]>=5))
Active tenants = countrows(filter(values('Active users'[Tenent_id]),[Active users]>=5)
Hope this helps.
This works great, thank you so much!
You are welcome.
Hi, @amedvedev
Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |