Forum Discussion
Count Dax needs a tweak to return a correct count for corresponding dates selected
Hi,
I am trying to find the count of DBName_id for the below conditions(selected date,filter conditions) as shown in below screenshot:
Below is the dax measure i tried for it:
Count =
CALCULATE (
DISTINCTCOUNT ( 'cumulus_licensee estatemanagement_contacts'[DBName_id] ),
FILTER (
'cumulus_licensee estatemanagement_contacts',
'cumulus_licensee estatemanagement_contacts'[Measure 2] > 0
)
)
I have not referenced the 'Database Name measure' in above measure and doubt that is causing issues, but i am not sure how to include that in above measure.
My expected output is count of 1 as shown below:
The count measure count would be dynamic, means when date is selected it will change accordingly.
Please help me to resolve this issue
PFA file here Timetravel.pbix
Thanks in advance!
amitchandak Ahmedx marcorusso Anonymous jdbuchanan71 Greg_Deckler
4 Replies
- lbendlin
Super User
Your data model is missing a data model. Please fix that first.
- sivarajan21
Post Prodigy
Hi lbendlin ,
Thanks for your response!
Could you please elaborate on what is missing and what can be done to resolve the issue?
Thanks in advance!
- lbendlin
Super User
identify your dimensions and facts. link 1:* from dimension to fact, single direction.
- AnonymousNot applicable
Hi sivarajan21 ,
Please try:Count = COUNTX ( FILTER ( SUMMARIZE ( 'cumulus_licensee estatemanagement_contacts', 'cumulus_licensee estatemanagement_contacts'[DBName_id], "@Measure 2", [Measure 2] ), [@Measure 2] > 0 ), 'cumulus_licensee estatemanagement_contacts'[DBName_id] )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group