Forum Discussion
Dax showing wrong value
Hello All,
I have some query regard dax i use dax but showing wrong value on my card visual
first measure is need to count how many time my name is apper on firstname column if 5 time show me value 5
6 Replies
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Assuming i've understand what you are trying to achieve, i'd suggest first you need to split your base aggreations into their own measures, then use a calculate statement to call that base measure with the added context to achieve your aims. I think what you are trying to achieve is this:
Name Count = COUNT('J Turner Dashboard'[First Name])(Count function ignores blanks)
Row Count = COUNTROWS('J Turner Dashboard')Avg Property Index = AVERAGE('J Turner dashboard'[Property Index])Number of Leasing Agents = CALCULATE( [Name Count], ALLEXCEPT('J Turner dashboard', 'J Turner Dashboard'[Property], 'J Turner Dashboard'[Month1],'J Turner Dashboard'[YearPart]) )Number of Prospect Survey Score = CALCULATE( [Row Count], ALLEXCEPT('J Turner dashboard', 'J Turner Dashboard'[Property], 'J Turner Dashboard'[Month1],'J Turner Dashboard'[YearPart]), NOT ISBLANK('J Turner Dashboard'[First Name]) )TotalPropertyIndex_Filtered = CALCULATE( [Avg Property Index], ALLEXCEPT('J Turner dashboard', 'J Turner Dashboard'[Property], 'J Turner Dashboard'[Month1],'J Turner Dashboard'[YearPart]), NOT ISBLANK('J Turner Dashboard'[First Name]) )(I added the non-blank to the average calculation to ignore the same rows as the other measures)
- x0Helper I
Hello Anonymous
Please have a look after trying your approach
and this is original
help me out for accurate result.
- AnonymousNot applicable
Seems like you want a distinct count instead of a regular count. Change the measure to be this:
Name Count = DISTINCTCOUNT('J Turner Dashboard'[First Name])
- x0Helper I
Hello Anonymous
I think so there is some filtering issue
i dont understand how it would process for filter but i check by add on filter pane
i add year , monthindex , property and first name
and if i check mark select show me correct count
it should be work automatically why it is not filtering ?