Forum Discussion
Dax showing wrong value
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)
- x02 years ago
Helper I
Hello Anonymous
Please have a look after trying your approach
and this is original
help me out for accurate result.
- Anonymous2 years agoNot 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])- x02 years ago
Helper I
Hello Anonymous
I want filtered row count which is 6 , hey one more thing i noticed my custom table that i created dynamically maybe problem is from that dax
CustomTable =FILTER(DISTINCT(UNION(SELECTCOLUMNS('Conversion', "LeasingAgent", LOWER('Conversion'[Leasing Agent]), "Property", 'Conversion'[Property], "Month1", 'Conversion'[Month1], "Year", 'Conversion'[YearPart], "MonthIndex", 'Conversion'[MonthIndex], "First Name", 'Conversion'[First Name]),SELECTCOLUMNS('Move Insq', "LeasingAgent", LOWER('Move Insq'[Leasing Agent]), "Property", 'Move Insq'[Property], "Month1", 'Move Insq'[Month1], "Year", 'Move Insq'[YearPart], "MonthIndex", 'Move Insq'[MonthIndex], "First Name", 'Move Insq'[First Name]),SELECTCOLUMNS('Query1', "LeasingAgent", BLANK(), "Property", 'Query1'[Property], "Month1", 'Query1'[Month1], "Year", 'Query1'[Year], "MonthIndex", 'Query1'[MonthIndex], "First Name", BLANK()),SELECTCOLUMNS('J Turner Dashboard', "LeasingAgent", LOWER('J Turner Dashboard'[Leasing Agent]), "Property", 'J Turner Dashboard'[Property], "Month1", 'J Turner Dashboard'[Month1], "Year", 'J Turner Dashboard'[YearPart], "MonthIndex", 'J Turner Dashboard'[MonthIndex], "First Name", 'J Turner Dashboard'[First Name]),SELECTCOLUMNS('Online Review', "LeasingAgent", BLANK(), "Property", 'Online Review'[Property], "Month1", 'Online Review'[Month1], "Year", 'Online Review'[Year], "MonthIndex", 'Online Review'[MonthIndex], "First Name", BLANK()),SELECTCOLUMNS('Shop Report Tracker (2)', "LeasingAgent", LOWER('Shop Report Tracker (2)'[First Name.]), "Property", 'Shop Report Tracker (2)'[Property], "Month1", 'Shop Report Tracker (2)'[Month1], "Year", 'Shop Report Tracker (2)'[Year], "MonthIndex", 'Shop Report Tracker (2)'[MonthIndex], "First Name", 'Shop Report Tracker (2)'[First Name.]))),NOT(ISBLANK([LeasingAgent])))this is i created for filter my data by first name , property and , month/yearbecause i noticed that provided dax from you if i use using j turner table property , first name and month showing correct value also i have doubght on relationship part, can you help me with this almost we are close to finish this error.maybe my custom table getting distic value or something else because result is wrong on other table as well .
- x02 years ago
Helper 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 ?