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.
Hello everyone!
I had some trouble with DAX expression.
When I try to divide two measures and summarize its result as a whole, it shows me the results of a divided total of two columns, this is not what I expected.
For example:
Nomenclature | qty - sales | qty in box | result | expected |
a | 10 | 2 | 5 | 5 |
b | 20 | 3 | 7 | 7 |
c | 30 | 4 | 8 | 8 |
d | 40 | 5 | 8 | 8 |
a | 20 | 2 | 10 | 10 |
b | 30 | 3 | 10 | 10 |
total | 150 | 19 | 8 | 48 |
*qty - sales and qty in box from different tables
If you have any solution, please share, thanks a lot!
@Anonymous , try like
sumx(summarize(Table, Table[Nomenclature], "_1",sum(Table[qty]),"_2",sum(Table[qty in box])),divide([_1],[_2]))
Or
sumx(values(Table[Nomenclature]), Divide(sum(Table[qty]),sum(Table[qty in box])))
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |