Forum Discussion
Dax Formula calculations
- Anonymous2 years ago
Hi Polar_A ,
Base on your description, it seems like the total values of FemaleCount and MaleCount are incorrect. You can create another two new measures as below and replace the measure [MaleCount] and [FemaleCount] with these two new measures.
New_FemaleCount = SUMX ( VALUES ( Prescriptions[Therapy] ), SUMX ( VALUES ( Patients[Referring Establishment] ), [FemaleCount] ) )New_MaleCount = SUMX ( VALUES ( Prescriptions[Therapy] ), SUMX ( VALUES ( Patients[Referring Establishment] ), [MaleCount] ) )In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
If the above ones can't help you figure out, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi Polar_A ,
Base on your description, it seems like the total values of FemaleCount and MaleCount are incorrect. You can create another two new measures as below and replace the measure [MaleCount] and [FemaleCount] with these two new measures.
New_FemaleCount =
SUMX (
VALUES ( Prescriptions[Therapy] ),
SUMX ( VALUES ( Patients[Referring Establishment] ), [FemaleCount] )
)New_MaleCount =
SUMX (
VALUES ( Prescriptions[Therapy] ),
SUMX ( VALUES ( Patients[Referring Establishment] ), [MaleCount] )
)
In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
If the above ones can't help you figure out, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards