Forum Discussion
Count Unique Dimension Based on Fact Table
- Anonymous1 year ago
Hi Dave1mo1 ,
Please update the formula of your measure [Unique Dealership Logins] as below and check if it can return the expected result...
Unique Dealership Logins = VAR _tab = CALCULATETABLE ( VALUES ( 'Activity Log Fact Table'[User ID] ), FILTER ( 'Activity Log Fact Table', 'Activity Log Fact Table'[Activity Date] IN ALLSELECTED ( 'FY Date Table'[Date] ) ) ) RETURN CALCULATE ( DISTINCTCOUNT('Dealership Lookup Table'[Dealer ID]), FILTER ( 'Dealer Users Lookup', 'Dealer Users Lookup'[User ID] IN _tab ) )If the above one can't help you figure out, please provide some raw data in above 4 tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi Dave1mo1 ,
Please update the formula of your measure [Unique Dealership Logins] as below and check if it can return the expected result...
Unique Dealership Logins =
VAR _tab =
CALCULATETABLE (
VALUES ( 'Activity Log Fact Table'[User ID] ),
FILTER (
'Activity Log Fact Table',
'Activity Log Fact Table'[Activity Date]
IN ALLSELECTED ( 'FY Date Table'[Date] )
)
)
RETURN
CALCULATE (
DISTINCTCOUNT('Dealership Lookup Table'[Dealer ID]),
FILTER ( 'Dealer Users Lookup', 'Dealer Users Lookup'[User ID] IN _tab )
)
If the above one can't help you figure out, please provide some raw data in above 4 tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards