Forum Discussion
DAX calculations
Hi I need help with some Dax queries.
Esentially I would like the dax to provide me a count of credit values per therapy and referring establishment, instead of it repeating for every single value.
The Dax code that I am using is:
PolarA
- Anonymous1 year ago
Hi, Polar_A
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the measure I've created for your needs:
MEASURE = CALCULATE ( SUM ( 'Table'[CreditNoteValues] ), FILTER ( 'Table', 'Table'[Referring Establishment] = MAX ( 'Table'[Referring Establishment] ) && 'Table'[Therapy] = MAX ( 'Table'[Therapy] ) ) )Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Take care to remove sensitive data.
For questions about uploading data, you can try the following links:
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Solved: How to upload PBI in Community - Microsoft Fabric Community
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi, Polar_A
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the measure I've created for your needs:
MEASURE = CALCULATE ( SUM ( 'Table'[CreditNoteValues] ), FILTER ( 'Table', 'Table'[Referring Establishment] = MAX ( 'Table'[Referring Establishment] ) && 'Table'[Therapy] = MAX ( 'Table'[Therapy] ) ) )Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Take care to remove sensitive data.
For questions about uploading data, you can try the following links:
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Solved: How to upload PBI in Community - Microsoft Fabric Community
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.