Forum Discussion
Dax measure parent/child
Hi
I have a table with customer and one with orders, which is related.
I my report, I view all customers having orders where some criteria is set for the order.
I need to add a column where I count all the orders (not filtered) for each customer.
Thanks in advance
- Anonymous4 years ago
Hi joki ,
If you want a measure. Please try this.
Measure = COUNTROWS('core_crm RecurringCharge')If you want a calculated column. Because some functions cannot be used under direct query, you need to convert the storage method of the table first. Note that this operation is irreversible, you can consider whether to use it according to the situation.
Please create this calculated column in table 'core_crm Contact'.
Column = CALCULATE(COUNTROWS('core_crm RecurringCharge'))Attaching the PBIX file for reference, hope this helps.
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
11 Replies
- jokiRegular Visitor
Thanks I did someting like that before. I get the error "Can't fint customertable[customer]" (customer)
- jokiRegular Visitor
I have now changes to "Import" (not direct query)
I try to create the meassure in "modelling data" but get the same error "Can't find 'core_crm Contact'[ContactId]
RecurringChargeTotalQty = Calculate(COUNTROWS('core_crm RecurringCharge'),Filter(ALL('core_crm RecurringCharge'),'core_crm Contact'[ContactId] = 'core_crm RecurringCharge'[Contact])) - AnonymousNot applicable
Hi joki ,
If you want a measure. Please try this.
Measure = COUNTROWS('core_crm RecurringCharge')If you want a calculated column. Because some functions cannot be used under direct query, you need to convert the storage method of the table first. Note that this operation is irreversible, you can consider whether to use it according to the situation.
Please create this calculated column in table 'core_crm Contact'.
Column = CALCULATE(COUNTROWS('core_crm RecurringCharge'))Attaching the PBIX file for reference, hope this helps.
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