Forum Discussion
Required Dax Correction / Help
- 2 years ago
Can you please try below DAX using Summarize. I have used AddColumns,Summarize DAX functions to create a virtual table and then done the calculation on 2 columns 'TotalSum' & 'TotalQualified' using SUMX, which should give the required total.
Sell Out Units Jan 24 =VAR summarizedTable = ADDCOLUMNS(SUMMARIZE('Customer Master','Customer Master'[ACCOUNT_NUMBER],'Customer Master'[PARTY_NAME],'Customer Master'[BRANCH]),"Total Sum",[CM MTD Sales],"Total Qualified",[Qualified Units Nov 23 Onwards])RETURNSUMX(summarizedTable,IF([Total Sum] = [Total Qualified],[Total Sum],IF([Total Sum] > [Total Qualified],[Total Qualified],IF([Total Qualified] > [Total Sum],[Total Sum],0))))I filtered data for few account number for a particular city. Total shows correct:Please try at your end.
Thanks,
Maddy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
Sell Out Units Jan 24 = SUMX( VALUES( 'Customer Master'[ACCOUNT_NUMBER] ), MIN( [CM MTD Sales], [Qualified Units Nov 23 Onwards] ) ) - 2 years ago
if both measures ([CM MTD Sales] & [Qualifited Untis Nov 23 Onwards] are equal then ?
Sell Out Units Jan 24 = SUMX( VALUES( 'Customer Master'[ACCOUNT_NUMBER] ), MIN( [CM MTD Sales], [Qualified Units Nov 23 Onwards] ) )plz guide .
- Anonymous2 years ago
Hi 123abc ,
Instead of the measure [Sell Out Units Jan 24] we can create a new measure [New Sell out] to be placed on the visual object.
Sell Out Units Jan 24 = VAR TotalSum = [CM MTD Sales] VAR TotalQualified = [Qualified Units Nov 23 Onwards] RETURN IF( TotalSum = TotalQualified, TotalSum, IF( TotalSum > TotalQualified, TotalQualified, IF( TotalQualified > TotalSum, TotalSum, 0 ) ) )New Sell out = SUMX( VALUES( 'Customer Master'[ACCOUNT_NUMBER] ),[Sell Out Units Jan 24])Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
its not working /// sorry.
- 2 years ago
Excellent its work... great.
Can you please try below DAX using Summarize. I have used AddColumns,Summarize DAX functions to create a virtual table and then done the calculation on 2 columns 'TotalSum' & 'TotalQualified' using SUMX, which should give the required total.
Please try at your end.
Thanks,
Maddy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.