The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi Experts,
I would like to ask to convert this Qlik expression to DAX. Thanks
sum(aggr(count(distinct [Customer]),[Customer]))
Solved! Go to Solution.
Certainly! The Qlik expression you provided involves aggregation functions, and in DAX (Data Analysis Expressions), you can achieve similar results using the SUMX and DISTINCTCOUNT functions. Here's the equivalent DAX expression
SUMX(
VALUES('YourTableName'[Customer]),
CALCULATE(
DISTINCTCOUNT('YourTableName'[Customer])
)
)
Replace 'YourTableName' with the actual name of your table in your Power BI or other DAX-compatible tool.
Explanation:
The SUMX function then iterates through each row of the table created by VALUES('YourTableName'[Customer]) and sums up the distinct count for each customer.
Make sure to replace 'YourTableName' with the actual name of your table and [Customer] with the actual name of your customer column.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
Certainly! The Qlik expression you provided involves aggregation functions, and in DAX (Data Analysis Expressions), you can achieve similar results using the SUMX and DISTINCTCOUNT functions. Here's the equivalent DAX expression
SUMX(
VALUES('YourTableName'[Customer]),
CALCULATE(
DISTINCTCOUNT('YourTableName'[Customer])
)
)
Replace 'YourTableName' with the actual name of your table in your Power BI or other DAX-compatible tool.
Explanation:
The SUMX function then iterates through each row of the table created by VALUES('YourTableName'[Customer]) and sums up the distinct count for each customer.
Make sure to replace 'YourTableName' with the actual name of your table and [Customer] with the actual name of your customer column.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |