Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
What is an equivalent DAX measure for the following SQL query:
select sum(amount) from (select distinct srcid, amount from mytable where datanameshort='name' and status = 'status');
Hi @MDR ,
Try this.
SUMX (
SUM( 'Table'[Amount] ),
CALCULATE ( DISTINCT ( 'Table'[Scrid] ) , 'Table'[datanameshort]='name' and 'Table'[status] = 'status)
)
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Proud to be a Super User!
Thanks @pratyashasamal this returns the following error:
The SUMX function expects a table expression for argument '1', but a string or numeric expression was used.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |