The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I am currently having a date table I use as slicer and I have:
1st Table
Table with all the visitors (one record for every day they visit it, therefore I have this DAX measure to calculate the Active Users:
Visit Date | Account ID | |
15/01/2022 | personab@gmail.com | AB12345 |
16/01/2022 | personab@gmail.com | AB12345 |
19/01/2022 | xyz@gmail.com | XZ9876 |
25/02/2022 | xyz@gmail.com | XZ9876 |
Account ID | Paid License Start Date | Paid License End Date | |
AB12345 | personab@gmail.com | 1/1/2022 | 31/3/2022 |
XZ9876 | xyz@gmail.com | 12/1/2022 | 12/4/2022 |
QW567 | nzc@test.com | 1/1/2022 | 31/12/2022 |
Hi, @Anonymous ;
Sorry, In your table I can't find the [LicenseExpirationDate] column however your measure had; In my understand, you could create this measure.
Active Users (NEW) = CALCULATE(
DISTINCTCOUNT(Analytics_Visitors[Email]),
FILTER( 'Analytics_Visitors',EOMONTH([Visit Date],0)=EOMONTH(MAX('calendar'[Date]),0)))
Total Named License Holders =
CALCULATE(DISTINCTCOUNT('Paid Users - Master Data'[Account ID]),
FILTER('Paid Users - Master Data',[Paid License Start Date]<=MAX('calendar'[Date])&&[Paid License End Date]>=MAX('calendar'[Date])))
diff = [Total Named License Holders]-[Active Users (NEW)]
The final show:
If not right ,can you share the example and the result you want to output?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your help, I don't need the difference but the number shared between the 2 tables for the same period (Paid Users who were active).
I tried to solve it in this way, what do you think about this?
Active PAID Users =
VAR CurrentDate = MAX('calendar'[Date])
VAR PaidUsers =
CALCULATETABLE(
VALUES('Paid Users - Master Data'[email]),
ALL('calendar'),
'calendar'[Date]<=CurrentDate,
ISBLANK('Paid Users - Master Data'[LicenseExpirationDate])
|| 'Paid Users - Master Data'[LicenseExpirationDate]>=CurrentDate
)
return CALCULATE( [Active Users], TREATAS( PaidUsers, Analytics_Visitors[Email]) )