Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I'm trying to count the unique number of dealerships represented in the data for the current fiscal year of my fact table.
Relevant relationships:
FY Date Table [Date] -----> Activity Log Fact Table [Activity Date]
Dealership Lookup Table [Dealer ID] -----> Dealer Users Lookup [Dealer ID]
Dealer Users Lookup [User ID] -----> Activity Log Fact Table [User ID]
I've tried to utilize distinctcount, but any time I try to put a fiscal year filter on the visual, I get a "blank" value (see below). I'm not great with DAX, and this is frustrating!
Solved! Go to Solution.
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
I'm not 100% sure without seeing your full model but you could try something like this...
dealer count =
COUNTROWS(
SUMMARIZECOLUMNS(
'Dealership Lookup Table' [Dealer ID],
"value", [A Measure From Your Fact Table]
)
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
hi @Dave1mo1 ,
Try like:
Measure =
COUNTROWS(
SUMMARIZE(
'Activity Log Fact Table',
'Dealership Lookup Table' [Dealer ID]
)
)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |